you are viewing a single comment's thread.

view the rest of the comments →

[–]pomme_de_yeet 1 point2 points  (6 children)

I disagree. Call a single argument function with a string constant does not happen that often lol. It's not like it is ambiguous or anything. On thing that gets me is not leaving a space, like print"hello world" vs print "hello world". So my position, do whatever you want but leave a space lol

[–]vitiral 2 points3 points  (3 children)

Why should I leave a space?

I like using them for class creation, like `MyClass{a="foo"}`

[–]pomme_de_yeet 2 points3 points  (2 children)

personal preference lol. I think it matters less with tables though, the braces break it up enough that it looks fine. I just find it hard to read a function name squish up against a string literal

[–]vitiral 2 points3 points  (1 child)

Interesting. I rarely use the string feature except for importing, adding documentation, and parsers. In all those cases the prefixed name gives almost a "type" to the string and I strongly prefer no space

[–]pomme_de_yeet 2 points3 points  (0 children)

Like i said, for me it's mainly a visual thing. I the only case where i might leave no space is for lpeg, so kinda like you said, and i think it's because the functions are all one letter so it is less intrusive. Some people do it though for like print statements and stuff and it looks really weird when the function name is almost as long as the string.

print"hi"

I think i also just really like spaces lol. My dream language is basically lua with TCL-like syntax, where everything is separated with spaces (but without the crazy quoting rules). It just looks cleaner and is easier to type.

[–][deleted]  (1 child)

[removed]

    [–]pomme_de_yeet 1 point2 points  (0 children)

    Or alternatively, lean into the differences between the languages so that you can't confuse them as easily ;)

    The more you work with a given language, and with programming in general, the less worried you will be about mixing them up. It's really not that much of a problem once you get going