Live data from Hacker News

Anic -- Faster than C, Safer than Java, Simpler than *sh

code.google.com

11–20 of 96 posts

Re: Anic -- Faster than C, Safer than Java, Simpler than *sh

#13
post #6

Faster than C – this is explained in the FAQ as most C programs being single threaded and ANI being inherently multithreaded. ANIC was posted to HN most of a year ago: http://news.ycombinator.com/item?id=1042122 with much commentary.

People shouldn't make claims like that honestly. It makes be discount the language almost immediately because I know I can't really trust what's written about it on its site.

Furthermore, there's tons and tons of parallel C code. Probably more than any other language. Almost any decent C library is reentrant. Many of major C projects (mostly thinking of server software and operating system kernels) are threaded.

Re: Anic -- Faster than C, Safer than Java, Simpler than *sh

#14
post #8

Earlier quoted context omitted.

Frankly there isn't a language in existence that's "easy to read" and I'm kind of sick of seeing that claim. There's no way you can read anyone's code without knowing at least something about the language. That said, I really like the ideas this language is offering and I'm definitely interested in giving it at try.

I'd argue that Python is very easy to read for someone new to programming, particularly someone familiar with mathematical notation. Something like: for animal in ['dog', 'cat', 'bear']: print animal strikes me as intuitive and obvious, both absolutely and also relative to the equivalents in other languages.

That is not necessarily a sign of a good language, though.

ADD 1 TO COBOL GIVING COBOL

is also readable, and yet (thankfully!) we've mostly abandoned COBOL.

And no, I'm not saying Python is bad, or like COBOL - just that readability and quality of a language are not necessarily related.

Re: Anic -- Faster than C, Safer than Java, Simpler than *sh

#15
Still reading through, it's definitely piqued my interest. However, in the interest of consistency [as it translates to readability] two issues right away:

1) Get rid of the infix modifier to the filter. The statement is made that in ANI everything flows left to right. The infix operator while providing familiar 1+6->7 notation conflicts with the above flow statement. 1,6+->7 while not immediately familiar is easy to understand after explained. However, added special case rules for infix operation muddies the water.

2) In the following code sample provided, the left to right rule is again not followed and thus leads to increased difficulty in [human] parsing:

multiPrint= [string\ s, int\ times] {

        \\[std.gen] std.out;
};

"Hello, World!\n", 10 ->multiPrint;

Instead, to be consistent and follow the previous left to right flow rule, use the following syntax:

multiPrint= [string\ s, int\ times] {

        \times -> \\[std.gen];

        s ->std.out;
};

"Hello, World!\n", 10 ->multiPrint;

In general if there is an everything flows left to right rule, there should not be a imho

Re: Anic -- Faster than C, Safer than Java, Simpler than *sh

#16
post #10

That is the fugliest thing I've ever seen. Looks like it's well written, planned and engineered tho.

Those were my thoughts as well. I like the idea of a language where multithreading is the default, but all those back slashes - it reminds me of * in C.

Re: Anic -- Faster than C, Safer than Java, Simpler than *sh

#18
post #16
post #10

That is the fugliest thing I've ever seen. Looks like it's well written, planned and engineered tho.

Those were my thoughts as well. I like the idea of a language where multithreading is the default, but all those back slashes - it reminds me of * in C.

Yeah, it could use with different characters for syntax.

Re: Anic -- Faster than C, Safer than Java, Simpler than *sh

#19
Latch concept is probably worth exploring further. Does anyone know of a language with native variables being a FIFO pipe? I.e.

  x = 1   // x now contains 1
  x = 2   // x now contains 1 and 2
  y = x   // x now contains 2, y now contains 1
  ...
This sort of thing. Not as an add-on construct, but as a native part of the language.

Re: Anic -- Faster than C, Safer than Java, Simpler than *sh

#20

Am I the only one thinking this code looks ugly and hacky. I would never code in this.

I don't know... I kind of like it. It's different, especially where the '\' is concerned, but the syntax as a whole has one thing I really really really like:

Much of the language doesn't use the shift-key, especially in the number-row. And where it does, it's frequently on easier-to-hit keys like 'Besides. You want ugly? Try K: http://en.wikipedia.org/wiki/K_(programming_language) . Or, heck, anything APL influenced.

Post reply on HN