6 points

Is this a prompt to bypass a restriction that gpt claims to not be able to use emojis?

permalink
report
reply
1 point

No, it’s an exercise in Swift showcasing how emojis are valid code.

permalink
report
parent
reply
6 points
*

But this is using string output, of course it will work. Define your variables as emoji.

let 😅 = 3

permalink
report
parent
reply
2 points

Good point. That’s still valid as far as I’m aware, was one of the first things the professor pointed out.

permalink
report
parent
reply

Swift

Nasty language for Apple-degenerates.

permalink
report
parent
reply
1 point

I don’t disagree. Apple’s funding the classes and there is a ton of demand for Swift devs.

To my surprise though, loving the language. Doesn’t waste my time with semi colons and encourages readability. Shame it’s stuck to Apple.

permalink
report
parent
reply
11 points

Is this gonna be one of those weird cases where evaluation of the assignment happens before the ternary operator?

permalink
report
reply
4 points

true, so 😃

permalink
report
reply
13 points

bash: let: =: syntax error: operand expected (error token is “=”)

permalink
report
reply
9 points

What programming language are you assuming this is? I’m thinking of it as JavaScript in my head and I don’t think there would be any errors.

permalink
report
parent
reply
2 points

It’s Swift, the Apple language.

permalink
report
parent
reply
2 points

Ewwww

permalink
report
parent
reply
8 points

It’s also perfectly valid JS.

permalink
report
parent
reply
1 point

Bash ain’t got no ternary does it?

permalink
report
parent
reply
22 points
*

🖕 ( nothing personal. It’s just the right answer. I ran the code. )

permalink
report
reply