Dechenjm / crack-language

Automatically exported from code.google.com/p/crack-language
Other
0 stars 0 forks source link

Named operators like in C++ #90

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
(Enhancement)

Hello!
Another feature that I would like is to be able to use named operators (or, 
and, bitor, …) like in C++.
For instance, I would like to be able to use this:
if(number == 0 or number == -1)
Of course, this will still be usable:
if(number == 0 || number == -1)
Thanks.

Original issue reported on code.google.com by boua...@mailinator.com on 13 Dec 2011 at 12:37

GoogleCodeExporter commented 9 years ago
Sorry, but in general I prefer that there be a single way to do things and also 
that the set of keywords be kept to a minimum.

If you want to substitute operators for keywords (or change any other syntactic 
feature of the language, for that matter) then I encourage you to take a look 
at the annotation system.  This will allow you to apply arbitrary 
transformations on the token stream, effectively re-writing the compiler if you 
so desire.

Original comment by mind...@gmail.com on 13 Dec 2011 at 12:56