Post a Comment
If you look in the FAQ http://research.sun.com/projects/plrg/faq/index.html you will find some example code. The question is, which editor supports subscripts, superscripts and unicode? Do I have to use LATEX, OpenOffice or Word to write my sourcecode?
Anton
"Note the use of subscripts and superscripts, the fact that multiplication is represented simply by writing the operands side by side (placing spaces in between them), the rendering of rational expressions, and the use of Unicode symbols for variables and operators."
It seems close to unusable to me...
You should try it first. Mathematica does something similar, letting you either use pure ASCII and your favorite text editor or use the Mathematica IDE which gives you access to standard mathematical symbols like superscripts, integration signs and stuff like that.
Personally I find the mathematical symbols greatly increase readability and ease of programming in many cases. A lot easier to make out where square roots begin and end and exactly how those fraction that are nested three deep actually look. So don't knock it until you've tried it.
Why is it unusable ?
Mathematics have been using notations as these in a standard manner for more than one hundred years and everyone has been happy about it.
The fact that " x = x + 1 " means something in C and pretty much every language that has followed, after centuries of having meant nothing, is what horrifies me.
You're easily horrified it seems: informatique is not math.
It makes sense to use the shortest notation for the most often used operator.
So there's nothing wrong about = for assignment and == for equality operator.
Too bad that the C language designer didn't use & and | for the logical (shortcut) operators and && || for the binary operators: boolean logic operations are used much more often than binary operators.
Not a stupid question at all!
You do need to go to the language spec ( http://research.sun.com/projects/plrg/fortress.pdf ) to find the answer though. It's in section 2.4 (which points to Appendix E), you basically use upper case and follow (La)TeX style.
As to which editor to use ... vi/emacs/notepad/..../teco
whichever you feel comfortable with, just so long as it saves plain text. I think. :-)
The lone comment so far on cnet http://news.com.com/5208-7344_3-0.html?forumID=1&threadID=24206&mes... wonders why the language is "crippled" from birth by being interpreted.
Just for the record, if they had bothered to read the FAQ available on the language http://research.sun.com/projects/plrg/faq/index.html they would see (#8 to #11) that the release is of a prototype and that in the future it probably will be a compiled language.
Hell, if they'd bothered to read the article, they would have read about the reason it is interpreted, and not compiled to machine code. I'm not going to even touch the fact that he thinks Java is interpreted ... completely oblivious to the advances that have been made to the JIT compiler in the last decade.
The interpreter runs on a Java foundation, but shouldn't be confused with Java itself. Java lets the same program run on a multitude of computers, so it means the Fortress project can be developed more widely.
Ultimately, Sun wants to build not just an interpreter, which executes Fortress software line by line, but also a compiler, which translates the software in advance into a form a computer can understand from the code a person wrote. Compiled software is generally faster than interpreted software. In addition, Sun envisions an optimizing compiler, a technology that adjusts the compiled version of software as it runs to improve performance.
Repeat after me: there is no such thing as an interpreted language, there is no such thing as an interpreted language, there is no such thing as an interpreted language!
Languages are specifications. They have implementations. Some implementations are interpretered, others are JIT'ed, and others are compiled. But, in general, there is nothing about the language that dictates whether it should be interpreted or compiled.
The original poster meant that it is undesirable to design programming languages according to the manner in which the programs are to be executed (native code, bytecode, interpreted, abstract specification or theoretical reasonning, like process calculi), and that they should be designed solely according to their expressivity.
I understand his/her point, but cannot say that I completely agree. Actually the two issues are closely intertwined : new languages are designed for their expressivity, but this expressivity concerns as much the problem space as it concerns the execution methods : for example, you might want to design a language that will allow you to easily implement computations in linear algebra and related problems. But nowadays you wouldn't do that without wanting to do that efficiently on a specific breed of computing architecture, such as vector processors, distributed computers, etc. This is a consideration related to the execution method.
But, in general, there is nothing about the language that dictates whether it should be interpreted or compiled.
In theory, yes. In practice, there are plenty of reasons that a language should be interpreted rather than compiled. The later the binding the better the reason to interpret.
Self modifying languages like lisp and forth are far more suitable to interpretation than to compilation.
Basic loves being interpretted and prefers not to be compiled.
if you're a scientist/engineer.
You can (nearly) at the same time do your work and write about it. Copy pasting formulas between publication and application would be awesome.
Math is a lot older than programming and has very useful methods of dealing with complicated information. I'd like to see _anybody_ write advanced math/physics stuff without those tricks like a function, taking some indexed arguments, indexed by one upper and one lower index, the latter being indexed itself.
Trying to write all this just as functions like f(a(1), b(2), c(3), alpha, n(i))=... will just destroy readability.
That said I don't think the language has much going for it if you are not a scientist...



