Apple Swift
-
THAT IS SO COOL!
l
-
I thought this was supposed to be a new programming language, but that looks like the same old shit.
-
http://www.globalnerdy.com/2014/06/03/swift-fun-fact-1-you-can-use-emoji-characters-in-variable-constant-function-and-class-names/
I see no problem with that.
-
@error said:
da_Doctah said:
Every time someone uses a semicolon God kills a kitten.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;_;
-
@DrakeSmith said:
Oh my god... swift is worse than I thought
I see no problem with that.Damn it! Do I need two shits, or three?
Was that supposed to be , or ?
Did I use or ?
My point is, emoji are a lot harder to remember than traditional words, especially when you've get such tiny differences between some of them.
-
-
Not every post on here is entirely serious you know....
What?!? Not serious?!?
Given that this is a written medium, it's hard to tell sometimes, which is why there there is a discussion about sarcasm tags, irony punctuation, etc., going on in Discourse and our reaction to it. Starts at around post 412
-
"eEEeeEEeEAE" is also a terrible variable name, but that's no reason to ban E from a language.
I see no reason why anyone would use emoji as a variable name, but I also see no reason to ban any Unicode character unless it's one of those that breaks things.
Filed under: Stupid Android won't let me insert a Right-to-left Override here
-
Given that this is a written medium, it's hard to tell sometimes, which is why there there is a discussion about sarcasm tags, irony punctuation, etc., going on in Discourse and our reaction to it. Starts at around post 412
See? if you program in Swift, you can program ironically. Perfect for all those Apple fanboi hipsters.
-
You'll have a lot more fun if you don't take anything posted here seriously.
-
This is now the most viewed thread that DIDN'T become about Discourse.
Conclusion: we hate anything hew and hip.
Filed under: Get off my lawn!
-
This is now the most viewed thread that DIDN'T become about Discourse.
It's like discourse is the new Hitler
fuhrfor Godwin's law.Filed under: Cut off one thread and two more shall arise!
-
Feature request: port Discourse to Swift
-
Feature request: port Discourse to Swift
Couldn't be worse than Ruby on Rails.
Filed under: That's what we said about Community Server.
-
What?!? Not serious?!?
Given that this is a written medium, it's hard to tell sometimes, which is why there there is a discussion about sarcasm tags, irony punctuation, etc., going on in Discourse and our reaction to it. Starts at around post 412
Sorry, that's my fault.
-
-
#sorry #notsorry
-
-
ON THE OTHER HAND, WE NOW HAVE A MORE SUITABLE WAY OF SHOUTING
abc
-
I JUST REALIZED THE POSSIBLE RAMIFICATIONS OF MY POST
abc
-
#WhatsTheProblem?
-
I fixed your post. You seem to have accidentally put a \ there.
-
This isn't as bad in Lua, which can automatically add semicolons even without newlines (yes,
print"Hello, world!"print"..."
is valid, feel free to consider it to be crazy). This is because Lua at least forbids the programmer from writing statements with no effect. For example, the program below fails, because you cannot subtract function return values when you don't use the result of addition. You cannot also use unary minus here either, as the return value of unary minus isn't used.somethingHere() - somethingElse() # lua: stdin:2: unexpected symbol near '-'
Similarly, strings are not statements.
str = "this is a long string" .. "I'm breaking into several lines" .. "oops, forgot two dots here -->" "I hope a single string literal" .. "isn't accepted as a statement" # lua: stdin:4: unexpected symbol near '"I hope a single string literal"'
-
Semicolons are like pages.
Filed under: If you try to take them away from me I will not rest until you are brought to justice., Come and take 'em
-
Funny note from Dhromed's edit of my post:
User mistakenly used proper escape sequence to produce unobtrusive text
#OH, I MEAN FUNNY NOTE FROM DHROMED'S EDIT OF MY POST:#USER MISTAKENLY USED PROPER ESCAPE SEQUENCE TO PRODUCE UNOBTRUSIVE TEXT
-
-
package main import "fmt" func main() { fmt whereas.Println insofaras(1, thetruthofthematter 2despiteallobjections, 3) notwithstanding }
This is valid Go code equivalent to
puts("1 2 3");
-
This is valid Go code
That's it. As defiled as this forum may have already been, Ben has now officially ass-raped it. The only further humiliation possible is posting multi-megapixel Dwarf Fortress screen shots.
-
This is because Lua at least forbids the programmer from writing statements with no effect.
Cool. I've used Lua before but I hadn't realized this.@ben_lubar said:This is valid Go code equivalent to puts("1 2 3");
ꖴᨋꖴ ఠ⁔ఠ
-
-
Also: 🐵 patching.
-
Copy ?
-
-
http://play.golang.org/p/hXKyWhnrWY
package main import "fmt" func main() { fmt whereas.Println insofaras(1, thetruthofthematter 2despiteallobjections, 3) notwithstanding }
This is valid Go code equivalent to
puts("1 2 3");
But can you use as an identifier?
Ninja edit: Apparently quoting code works about as well as you'd expect.
-
Don't stop.
Be Lee, Ving.
-
-
"Variables are always initialized before use, arrays and integers are checked for overflow, and memory is managed automatically"
Wow, managed memory? Variables are initialised? I don't think I can handle the amount of innovation here. Clearly Apple have redefined expectations of what programming languages should do.Oh my god... swift is worse than I thoughthttp://www.globalnerdy.com/2014/06/03/swift-fun-fact-1-you-can-use-emoji-characters-in-variable-constant-function-and-class-names/
A large number of languages allow unicode characters as identifiers. This is nothing new.
-
Most languages[citation needed] only allow letters, numbers, and underscores in identifiers. Emoji are none of those.
-
A large number of languages allow unicode characters as identifiers.
I was just thinking about this; is the language parser defined to normalize the string as part of the tokenization process? If not, that would be a source of awesome amounts of frustration between different ways of writing particular glyphs. It would be almost like including DRM directly in the source because anyone looking at the code would be unable to figure out how to write the names of the symbols inside it…
And can we redefine the names of the keywords? That would be neat too. Less useful though.
-
Most languages[citation needed] only allow letters, numbers, and underscores in identifiers.
Are you sure about that? Maybe that's just what it is convenient to type. (Also, when you say “letter”, what do you mean? With non-latin alphabets, this can get a bit more complicated to define…)
Filed under:
\makeatletter
-
Also, when you say “letter”, what do you mean? With non-latin alphabets, this can get a bit more complicated to define…
Thankfully, we don't have to define letters or numbers because Unicode already does!
-
Most languages[citation needed] only allow letters, numbers, and underscores in identifiers. Emoji are none of those.
C#, Java and PHP all allow unicode identifiers, including certain symbols. JavaScript doesn't. Not sure about other languages though.
I've never tested Emoji but I assumed they'd work given weird random symbols work.
-
Just shooting from the hip here without verifying myself, but my understanding is that while, for example, c++ standard allows it, most compilers don't (for sanity reasons I imagine)
-
I've never tested Emoji but I assumed they'd work given weird random symbols work.
They don't in C#, but it allows eg. Š and random kanji.
-
C#, Java and PHP all allow unicode identifiers, including certain symbols. JavaScript doesn't.
Are you sure about JavaScript?I miss my signature
If mixed metaphors were illegal, I'd be having an indigestion. typeof NaN == 'number' var ò_ó, ಠ⁔ಠ, ᄒᆺᄒ, ᅙᅳᅙ, ᖛᨓᖜ, ꖴᅩꖴ, ఠᨋఠ; // Naming your variables is serious business
-
A large number of languages allow unicode characters as identifiers. This is nothing new.
Frankly, I've always wondered why. You need your 26 Latin letters anyway to type keywords, why not identifiers? Not to mention that I have yet to see code written by anyone with more than a year of coding experience which doesn't use at least vaguely English identifiers...
Filed under: aside from CodeSODs obviously
-
Frankly, I've always wondered why. You need your 26 Latin letters anyway to type keywords, why not identifiers? Not to mention that I have yet to see code written by anyone with more than a year of coding experience which doesn't use at least vaguely English identifiers...
Have you ever read code written by someone who grew up in Russia? Or Turkey? Maybe Taiwan? I haven't, but I bet that there are plenty of experienced programmers in those countries who would love to take advantage of the chance to have identifiers in their native language.
-
Have you ever read code written by someone who grew up in Russia? Or Turkey? Maybe Taiwan? I haven't, but I bet that there are plenty of experienced programmers in those countries who would love to take advantage of the chance to have identifiers in their native language.
Well, we have it a little easier in that we can just replace our ąćęż with acez with pretty much no loss of information. As for the case where the whole alphabet is different... I don't know, I find it hard enough to switch my brain between English keywords/library tokens and my own Polish tokens. I believe switching between different alphabets would be even harder - but that's just, like, my opinion, man.
And if you don't know English as a programmer, you're pretty much fucked anyway. And that's a fact.
-
I don't know, I find it hard enough to switch my brain between English keywords/library tokens and my own Polish tokens.
<snip>
And if you don't know English as a programmer, you're pretty much fucked anyway. And that's a fact.
This. I'd rather deal with poor English in my code than localized names. Freaking things give me a mental whiplash at times.
Also, it's awesome how it gets abused. You know how you can't write something like int int; ? With localized names you can! And then combine it with poor translations and welcome to confusion-ville!
"Fun" fact: I was actually taught that a 1-dimensional array is called "niz" (loose translation: sequence), and multi-dimensional arrays are called "polje" (close enough). And they start explaining how it's all just syntactic sugar and it's the same data structure (talking C here) AFTER they talk about them like different concepts for weeks.
Then they try to explain sequences to you...
Filed under: Thankfully, I knew this shit before I had a chance to get confused
-
And if you don't know English as a programmer, you're pretty much fucked anyway. And that's a fact.
I agree with that. Doesn't stop some from adding identifiers in whatever their primary language is.