Live data from Hacker News

Zinc: a low level language between assembler, C and C++ with Ruby-like syntax

tibleiz.net

11–20 of 51 posts

Re: Zinc: a low level language between assembler, C and C++ with Ruby-like syntax

#11
post #6

I was surprised by my almost-panicky reaction to seeing: Identifiers Can Have Blanks open_window_with_attributes(...) becomes: open window with attributes (...) I think I actually felt that wrongness in my stomach. Like a more intense version of seeing our corporate network shared drive's files with spaces and parens in them. I guess I'm old.

While i didn't panic, i find myself having quite a negative reaction to a language in which "Identifiers can have blanks" is listed under main features.

EDIT : Also, i see quite the opportunity from wrong parsing, not on the machine side, but on the human side. blanks already have a function in other programming languages : They are here to separate symbols. By giving them this double meaning, you actually bring context in the parsing of any piece of code, which i think could be a pretty painful exercise.

Other version : Don't design a language version because it makes code easier to type, if it doesn't also make it easier to read

(I know the author thinks it easier to read, but i'm not yet convinced about that)

Re: Zinc: a low level language between assembler, C and C++ with Ruby-like syntax

#12
What is wrong with 64 bit integers? Maybe they've been indicted on war crimes or something. The number of languages that appear and don't support them.... And what about interfacing with C? I can count the languages on one hand that have a simple and efficient C interface! (I have a list of other things almost always ignored by languages for no good reason... efficiency, friendly license, lack of macros or ability to extend the language...)

Re: Zinc: a low level language between assembler, C and C++ with Ruby-like syntax

#13
post #10
post #6

I was surprised by my almost-panicky reaction to seeing: Identifiers Can Have Blanks open_window_with_attributes(...) becomes: open window with attributes (...) I think I actually felt that wrongness in my stomach. Like a more intense version of seeing our corporate network shared drive's files with spaces and parens in them. I guess I'm old.

That strikes me as giving lie to the "Ruby-like syntax" claim; ask a Ruby programmer what that line means and you will not get the correct answer for Zinc. Actually the connection with Ruby is tenuous anyhow; Ruby and assembler just don't go together. An assembler should produce a very clear one-to-one correspondence of instruction to machine language opcode, pretty much by definition. A high-level language can turn…

A high-level language can turn a simple statement into arbitrarily-complicated run-time code, pretty much by definition.

There are some high level languages where there is a pretty straightforward one-to-one correspondence of statement to bytecode(s).

There isn't much syntax cross-talk to be had there.

Explain the existence of Forth.

Re: Zinc: a low level language between assembler, C and C++ with Ruby-like syntax

#14

Earlier quoted context omitted.

From the article: "I did this because I hate uppercase characters in the middle of identifiers and I'm too lazy to type shift to get the '_'. In addition, I find it more readable." just-use-lisp-style-identifiers-then

>just-use-lisp-style-identifiers-then hitting - is not significantly easier than hitting _ when compared to hitting the spacebar. http://en.wikipedia.org/wiki/Fitts_law

Well, use Whitespace then:

http://en.wikipedia.org/wiki/Whitespace_(programming_languag...

Re: Zinc: a low level language between assembler, C and C++ with Ruby-like syntax

#15

Earlier quoted context omitted.

From the article: "I did this because I hate uppercase characters in the middle of identifiers and I'm too lazy to type shift to get the '_'. In addition, I find it more readable." just-use-lisp-style-identifiers-then

>just-use-lisp-style-identifiers-then hitting - is not significantly easier than hitting _ when compared to hitting the spacebar. http://en.wikipedia.org/wiki/Fitts_law

This is yet another reason I enjoy typing in Dvorak :) (-_ is in a better place)

Re: Zinc: a low level language between assembler, C and C++ with Ruby-like syntax

#16
post #7
post #6

I was surprised by my almost-panicky reaction to seeing: Identifiers Can Have Blanks open_window_with_attributes(...) becomes: open window with attributes (...) I think I actually felt that wrongness in my stomach. Like a more intense version of seeing our corporate network shared drive's files with spaces and parens in them. I guess I'm old.

I had a similar reaction, and I'm not sure that it's a "damn kids, get off my lawn" reaction. Specifying an unambiguous grammar may be difficult - which implies parsing may become a problem. An implementation exists, so the author has something working, but I'm wondering how robust the parsing is. I haven't seen many code examples (only short fragments on the page), so I don't know what potential issues, if any, ther…

Issues only arise if the language designer wants to use spaces for something else as well (like function application).

Re: Zinc: a low level language between assembler, C and C++ with Ruby-like syntax

#17
post #15

Earlier quoted context omitted.

>just-use-lisp-style-identifiers-then hitting - is not significantly easier than hitting _ when compared to hitting the spacebar. http://en.wikipedia.org/wiki/Fitts_law

This is yet another reason I enjoy typing in Dvorak :) (-_ is in a better place)

I honestly thought you'd posted a snippet of smalltalk or lisp or something for a second there. I think some people refer to that as a "brainfart."

(Note that I have no practical knowledge of either language. I probably wouldn't have admitted this if I did.)

Re: Zinc: a low level language between assembler, C and C++ with Ruby-like syntax

#18
post #7
post #6

I was surprised by my almost-panicky reaction to seeing: Identifiers Can Have Blanks open_window_with_attributes(...) becomes: open window with attributes (...) I think I actually felt that wrongness in my stomach. Like a more intense version of seeing our corporate network shared drive's files with spaces and parens in them. I guess I'm old.

I had a similar reaction, and I'm not sure that it's a "damn kids, get off my lawn" reaction. Specifying an unambiguous grammar may be difficult - which implies parsing may become a problem. An implementation exists, so the author has something working, but I'm wondering how robust the parsing is. I haven't seen many code examples (only short fragments on the page), so I don't know what potential issues, if any, ther…

I already have hard time parsing this code. The main problem I see, is that to read the code I have to know every single keywords in the language.

For example I was wondering if "new" is a keyword. If it is, then "new string ()" might be something interesting, otherwise it's just a function call.

Similarly this raises a question of whether I can write the following code:

  if end of line (str)
This might or might not be permitted because "end" is a keyword. If it is permitted, then the result looks pretty damn ambiguous to me. If it's not then I have to name my identifier differently, like so:

  if end_of_line (str)
But then I'm skrewing up the style of my code...

Re: Zinc: a low level language between assembler, C and C++ with Ruby-like syntax

#20
post #6

I was surprised by my almost-panicky reaction to seeing: Identifiers Can Have Blanks open_window_with_attributes(...) becomes: open window with attributes (...) I think I actually felt that wrongness in my stomach. Like a more intense version of seeing our corporate network shared drive's files with spaces and parens in them. I guess I'm old.

From the article: "I did this because I hate uppercase characters in the middle of identifiers and I'm too lazy to type shift to get the '_'. In addition, I find it more readable." just-use-lisp-style-identifiers-then

but then you sacrifice the "-" (minus) infix operator
Post reply on HN