4 ms·
I found the part about IDEs fascinating: IntelliJ will recognize those ugly anonymous classes, and show them to you as closures. I wonder how far you could tak
by mdemare 17y ago
I found the part about IDEs fascinating: IntelliJ will recognize those ugly anonymous classes, and show them to you as closures.
I wonder how far you could take this. A language like Duby gives you Ruby syntax, while producing identical bytecode as Java. If you could translate Duby into Java source code, and parse and show it as Duby, your IDE could let you program in Duby without anyone else on your project even noticing.
Then you're in effect relegating Java to object code.
- bad_user 17y agoIsn't that what compilers do? I actually am thinking of writing a compiler for a custom language that will be translated to Java. It will be a lot like C#, but simplified, with a lot of the cruft removed (like the requirement to define a Main class with a static main, or the requirement that all code should be wrapped in a class, but reified generics is something I want although I'm not sure if it's feasible). I don't like Duby, I don't like Ruby for that matter. Mostly because the syntax is not as extensible as I'd like and because the variables don't have lexical scope.
- axod 17y agoI think it's a pretty bad idea. The more IDEs hide code from people, the more verbose code will be produced. Much easier to just setup a simple macro system to run over source files and replace things before compilation.
- eru 17y agoWhere's the difference?