What's this for?
* Language Designers:
Looking for operator or function names? Well have a look at the
following and
remember using existing one may ease the transition :)
* Language Users:
You know one language and want to find the corresponding operator or
function
in another language
* Language lovers:
Want to know the various ways people invented for
commenting/assigning/...?
CHANGES:
- the page has now much more entries
- one can check the missing entries per language at
http://merd.net/pixel/language-study/syntax-across-languages-per-language/
Contributions, suggestions and fixes are welcome.
--
Pixel
programming languages addict http://merd.net/pixel/language-study/
--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
Labeling the (==) and (/=) operators as deep equality does not seem quite
right. Their meaning _can be_ that of deep equality, but it can also be very
different. I think I have seen them called notional equality.
David Feuer
David Feuer
(this is about Haskell)
AFAIK:
- the deep vs shallow problem doesn't really occur in non mutable data
structures. And I think that's the main semantic difference between
various
equality testing.
- the fact that you can give an implementation of Eq *not* computing
deep
equality is no problem for me. The typical semantic *is* deep equality,
even
if the language doesn't ensure it.
> I think this "syntax across languages" thing is kind of silly, if it can't
> deal with the very large semantic differences between languages.
I agree it's kind of hard to mix everything together... but i'm trying
anyhow.
Either tell me how to enhance it or ignore it ;)
> It seems to be designed mainly for Java-like OO languages,
i think the Java camp will say the opposite, having a look at the many
functions needing an anonymous function[1]
eg: find filter foldl any all
> and can't deal with other
> things too well. For example, Haskell has no built-in notion of control flow
> whatsoever, no built-in (or standard) notion of exceptions, no concept of a
> "statement", no built-in concept of a mutable variable, rather different
> lexical rules than "syntax across languages" seems prepared for, a very, very
> different idea of a class and method, which is really not OO at all, etc.
AFAIK there are many things in haskell that looks alike things in other
languages. I agree i've not put any special monad entries (>> >>= ...)
since
haskell is the only one having this. I try to keep things as general as
possible (i didn't put the prolog's cut syntax...)
As for Haskell and OO, i see a nice parallel between mix-ins, java
interfaces
and type classes (one could say it has multi-methods :)
[1] well even if its do-able using inner classes or methods, it's not
really
practical, that's why you don't find those functions in Java.