November 20, 2008, 05:07:24 pm *
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Syntax for .getStuff()  (Read 1365 times)
KirillOsenkov
Newbie
*
Posts: 11


« on: May 11, 2007, 09:28:21 pm »

C# has so-called properties, which means one could write

c.Package.Name.matches
instead of
c.getPackage().getName().matches

It would be nice to hear the opinion of language designers about the possibility of introducing this little sugar additionally to the existing syntax Smiley

Your probable answers might include:
a) no time for this now
b) would be nice to have sometimes in the future
c) it would contradict with the Java world
d) we have code completion anyway, so there is no typing overhead
e) it would break existing queries (compatibility reasons)
f) other

Thanks Smiley
Logged
Mathieu Verbaere
Administrator
Newbie
*****
Posts: 26


« Reply #1 on: May 12, 2007, 02:48:20 pm »

Hi Kirill,

We thought about properties and decided not to include them for two main reasons:
a) keep the syntax of .QL as simple as possible,
b) stay as close as possible to the Java world.

We do not exclude, however, to add them in the future, especially when we come up with a version of SemmleCode for the C# community.

Please let us know if you think about other language features to improve .QL. Also, what are the tool features you would like to see in the version of SemmleCode for C#? Would you prefer to have a specific IDE integration or a standalone version?
Logged
KirillOsenkov
Newbie
*
Posts: 11


« Reply #2 on: May 12, 2007, 05:00:47 pm »

Oh wow... C#... interesting.
IMHO a C# version of the tool should be integrated into Visual Studio as a package (for the same reason why Java version is integrated into Eclipse) - almost everyone who uses C# professionally, uses Visual Studio. Although, I have to warn, integrating with VS is a more difficult task than integrating with Eclipse...
Logged
Pages: [1]
  Print  
 
Jump to: