Conversation

how to tell if a language is compiled:

are there semicolons at the end of every line?

no: it’s interpreted

yes: it’s compiled

3
0
11

there is a weirdly strong correlation and I’m not sure why that is

3
0
6

@kasdeya this implies that matlab/octave is compiled iff you don’t print anything.

0
0
1

@kasdeya compiled languages want to be like C and interpreted languages want to not be like C?

1
0
1

@kasdeya [calvin's dad voice] despite semicolons being a part of the language, javascript is interpreted (bc the semicolons are optional)

2
0
1

@kasdeya interpreted languages having a REPL where the semicolon is annoying?

1
0
1

@kasdeya

import sys;

def main(args=None):
    if args is None:
        args = sys.argv;
    ...;

if __name__ == "__main__":
    main();

and sure enough, python is compiled :p

1
0
2

@eclairwolf @kasdeya javascript semicolons are optional because js is optionally (jit-)compiled, it all checks out

0
0
1

@eclairwolf
Only because of Automatic semicolon insertion! There are cases where it will fail, like having a newline between a return and the return object for example.
@kasdeya

1
0
1

@h3mmy @kasdeya automatic semicolon insertion has gotta be my favorite part of js - somehow brendan eich managed to make both semicolon likers and haters mad. unprecedented lows in language design

2
2
1

@nycki that honestly does kinda fit what my experience is. except for the compiled languages which want to be like Java. but Java wants to be like C in a grey business suit

0
0
2

@emmy that’s an interesting thought! I wonder if that’s at least part of what’s going on

0
0
1

@eclairwolf @h3mmy @kasdeya It seems to be a uniquely JavaScript problem, probably exacerbated by quirks of the grammar. The language Icon also has automatic semi-colon insertion and doesn't have the problems JavaScript has. But Icon is a little more Algol like than JavaScript is.

0
0
1

@eclairwolf @h3mmy @kasdeya im grateful to javascript for giving my main silver lining to the erosion of the world wide web and metastasizing of Apps in its place: the potential for a world with proportionally less javascript

0
0
0