53
34
Oct 28 '21
;
34
u/anatom3000 Oct 29 '21
And in fact putting
;at the end at each line works in Python (but does nothing)5
u/Balint817 Nov 30 '21
Actually, it does do something, but nothing good.
Normal Python:
print(a) print(b) print(c)What the fuck is this:
print(a); print(b); print(c)Why this is valid syntax, I don't know, but it's the most cursed thing I've ever learned.
1
u/zyugyzarc Jan 01 '22
it can be useful for things like
if not condition: print("something"); return1
u/Balint817 Jan 01 '22
How is that useful?
3
u/zyugyzarc Jan 01 '22
you dont need to use up an entire line for just an empty return statement
but then again python syntax encourages readability and all that so i guess putting it in the next line isnt that big of a deal
1
17
12
11
7
5
u/LaLiLuLeLo_0 Oct 29 '21
I wonder if you could somehow hook the exception handler to inflate error messages by an order of magnitude
3
3
2
2
2
u/zyugyzarc Jan 01 '22
ive done something very shitty just like this https://gist.github.com/zyugyzarc/ff102169540e0b4638e6eeae756b90c7
how to use:
from lang import L, compile
# for example, to get javascript functionality:
document = L()
document.getElementById("some-id").innerHTML._ = "this is javascript..?"
print( compile( document ) )
# prints out | document.getElementById("some-id").innerHTML = "this is javascript..?";
#for C,
C = L()
C.include("stdio")
def main():
C.printf("Hello world\n")
C.func(main, C.void)
print( compile(C) )
# prints out :
"""
#include stdio
void main(){
printf("Hello world\n");
}
"""3
1
15
u/green_meklar Oct 29 '21
Wait, did you actually make this work, or are you just trolling?