|
MeruFM posted:this is why php is the best language please dont summon tbc
|
# ? Apr 1, 2015 04:53 |
|
|
# ? May 13, 2024 08:08 |
|
Notorious b.s.d. posted:let me get this clear: we're already discussing one of the most short-term-memory intensive activities in all of human endeavor, and you consider it a net win to add more context-specific behavior? "short-term-memory intensive activities" is why we use shorthand stuff like "5 + 3" instead of "five plus three" in the first place. common operations are worth having operators for
|
# ? Apr 1, 2015 04:57 |
|
Stringbuilder.add("lol")
|
# ? Apr 1, 2015 04:58 |
|
HappyHippo posted:"short-term-memory intensive activities" is why we use shorthand stuff like "5 + 3" instead of "five plus three" in the first place. common operations are worth having operators for i would be totally ok with "5.plus(3)"
|
# ? Apr 1, 2015 05:01 |
|
Notorious b.s.d. posted:i would be totally ok with "5.plus(3)" how come it doesn't bother you that '.' means both 'the end of a sentence' and 'call a method defined on this object' and 'a decimal number'
|
# ? Apr 1, 2015 05:04 |
|
Notorious b.s.d. posted:i would be totally ok with "5.plus(3)" thats really gross
|
# ? Apr 1, 2015 05:05 |
|
HappyHippo posted:"short-term-memory intensive activities" is why we use shorthand stuff like "5 + 3" instead of "five plus three" in the first place. common operations are worth having operators for is there evidence for a big difference in cognitive load once the expression is familiar? I'm not up on whatever part of neuropsycholonguistics that is, would love to know more.
|
# ? Apr 1, 2015 05:05 |
|
Subjunctive posted:is there evidence for a big difference in cognitive load once the expression is familiar? I'm not up on whatever part of neuropsycholonguistics that is, would love to know more. can a mod please rename this thread 'big hot cognitive loads'
|
# ? Apr 1, 2015 05:06 |
|
MALE SHOEGAZE posted:how come it doesn't bother you that '.' means both 'the end of a sentence' and 'call a method defined on this object' and 'a decimal number' because it doesn't mean "the end of a sentence." it's not overloaded
|
# ? Apr 1, 2015 05:13 |
|
I'm fine with 5 + 3. I'm fine with 5.plus(3). I'm fine with (+ 5 3). it doesn't really matter.
|
# ? Apr 1, 2015 05:42 |
|
fleshweasel posted:I'm fine with 5 + 3. I'm fine with 5.plus(3). I'm fine with (+ 5 3). it doesn't really matter. what about 5 3 +
|
# ? Apr 1, 2015 05:57 |
|
rrrrrrrrrrrt posted:what about 5 3 + this is also fine, assuming nobody ever redefines + to be an arbitrary non-mathematical operation
|
# ? Apr 1, 2015 06:05 |
|
i prefer the whitespacespace operator for string concatenation printf("foo" "bar");
|
# ? Apr 1, 2015 06:21 |
|
mathematical operations are totally fine though, right? so for example, if you have some sets, it's totally reasonable to use the + operator to create the union (the additive combination) of those sets. similarly, if you have a ordered collection, it's reasonable to use + to construct the additive combination by appending the contents of another collection. the real question is why most languages only let you use those operators on a small subset of the types for which they make sense.
|
# ? Apr 1, 2015 06:30 |
|
Jabor posted:mathematical operations are totally fine though, right? so for example, if you have some sets, it's totally reasonable to use the + operator to create the union (the additive combination) of those sets. similarly, if you have a ordered collection, it's reasonable to use + to construct the additive combination by appending the contents of another collection. this but the strings are sets of character sequences
|
# ? Apr 1, 2015 07:01 |
|
i guess set union and sequence concatenation etc don't overflow thus making them unfit of the purity and beauty of +
|
# ? Apr 1, 2015 07:25 |
|
you all love to recommend java but for web frameworks it's a very weird place for a p-langer to come to. play seems to be exclusively scala/gradle and only accidentally and very reluctantly supports java, spring is trying super hard to be modern but if you try and get past the very basic tutorials you need to understand the whole stack and drop wizard seems okay but it assumes you've been programming java since 1.2 and really know why you need guava or guice or whatever the gently caress did I miss any. oh wait ninja. it can't be good it's called ninja.
|
# ? Apr 1, 2015 08:12 |
|
my stepdads beer posted:you all love to recommend java but for web frameworks it's a very weird place for a p-langer to come to. play seems to be exclusively scala/gradle and only accidentally and very reluctantly supports java, spring is trying super hard to be modern but if you try and get past the very basic tutorials you need to understand the whole stack and drop wizard seems okay but it assumes you've been programming java since 1.2 and really know why you need guava or guice or whatever the gently caress you know it's bad when people unironically recommend grails
|
# ? Apr 1, 2015 08:37 |
|
i sorta agree w/ bsd in that operator overloading is a super horror but + is one of those cases where its so intuitive for it to be string concatenation that its stupid to argue against it id still rather a good "".format() method for string ops tho
|
# ? Apr 1, 2015 12:01 |
|
I have no problem with using + to concatenate strings together but it bugs me that this is the sole instance of operator overloading in the entire Java programming language
|
# ? Apr 1, 2015 12:34 |
|
PleasureKevin posted:are there any books are team treehouse videos specifically on content discovery. as in the feature every social media app has where you can find, say, tweets that the computer thinks you might like. like a "recommender system"?
|
# ? Apr 1, 2015 13:03 |
|
+ is totally fine to combine strings with, if you want a mathematical justification, strings are just elements in the free group generated by all single characters and the + is just the group operation or you can just deal w/ it, idc
|
# ? Apr 1, 2015 13:05 |
|
qntm posted:I have no problem with using + to concatenate strings together but it bugs me that this is the sole instance of operator overloading in the entire Java programming language it's not, really. + on doubles is a different operator from + on integers just like it's a different operator from strings. they're overloaded on types, you just can't extend the set of types.
|
# ? Apr 1, 2015 13:07 |
|
ya but the plus operator in foo + bar could be foobar or ? encoded (f + o + o) + (b + a + r) or w/e having + be the accepted operator for string concatenation doesn't mean that it makes sense basically what i'm trying to say is that operator overloading is awful and no one should ever do it ever because it literally makes all other programmers looking at your codebase want to murder you
|
# ? Apr 1, 2015 13:13 |
|
Blinkz0rz posted:ya but the plus operator in foo + bar could be foobar or ? encoded (f + o + o) + (b + a + r) or w/e sure, and you could encode division differently for floats and integers (some language do) -- does it bother you when they share a symbol?
|
# ? Apr 1, 2015 13:14 |
|
my stepdads beer posted:you all love to recommend java but for web frameworks it's a very weird place for a p-langer to come to. play seems to be exclusively scala/gradle and only accidentally and very reluctantly supports java, spring is trying super hard to be modern but if you try and get past the very basic tutorials you need to understand the whole stack and drop wizard seems okay but it assumes you've been programming java since 1.2 and really know why you need guava or guice or whatever the gently caress asp.net is the best web stack currently
|
# ? Apr 1, 2015 13:15 |
|
qntm posted:I have no problem with using + to concatenate strings together but it bugs me that this is the sole instance of operator overloading in the entire Java programming language a better way to think of it is that javas designers correctly realized strings were the only place overloading made sense.
|
# ? Apr 1, 2015 13:18 |
|
Subjunctive posted:sure, and you could encode division differently for floats and integers (some language do) -- does it bother you when they share a symbol? not really. i'm fine with language designers using the same operator to do similar operations on similar types but letting other programmers do it is terrible
|
# ? Apr 1, 2015 13:18 |
|
qntm posted:I have no problem with using + to concatenate strings together but it bugs me that this is the sole instance of operator overloading in the entire Java programming language its more irritating that '+' on strings isn't commutative so it should be something like & or * or something cool languages just let u define a monoid instance and call it a day!!!
|
# ? Apr 1, 2015 13:23 |
|
people get way too annoyed about operator overloading. its very useful when you really need it and annoying enough to do that most people dont bother when you dont.
|
# ? Apr 1, 2015 14:16 |
|
HappyHippo posted:people get way too annoyed about operator overloading. its very useful when you really need it and annoying enough to do that most people dont bother when you dont. When do you really need it though
|
# ? Apr 1, 2015 14:33 |
|
vectors, matrices, bigints (if not built in), complex numbers, that sort of thing also overloading [] has good uses. it would be pretty annoying if std::vector didn't overload it HappyHippo fucked around with this message at 14:40 on Apr 1, 2015 |
# ? Apr 1, 2015 14:36 |
|
MALE SHOEGAZE posted:When do you really need it though mostly only math majors need it for doing their math homework and who cares about them.
|
# ? Apr 1, 2015 14:39 |
|
careful there we wouldnt want to do any math with our computers
|
# ? Apr 1, 2015 14:41 |
|
HappyHippo posted:vectors, matrices, bigints (if not built in), complex numbers, that sort of thing allocation control via operator new, smart pointer implementation e: functors, natural cross-language syntax Subjunctive fucked around with this message at 14:45 on Apr 1, 2015 |
# ? Apr 1, 2015 14:42 |
|
my stepdads beer posted:you all love to recommend java but for web frameworks it's a very weird place for a p-langer to come to. play seems to be exclusively scala/gradle and only accidentally and very reluctantly supports java, spring is trying super hard to be modern but if you try and get past the very basic tutorials you need to understand the whole stack and drop wizard seems okay but it assumes you've been programming java since 1.2 and really know why you need guava or guice or whatever the gently caress wicket is a little more "batteries included" than spring mvc
|
# ? Apr 1, 2015 15:14 |
|
HappyHippo posted:careful there we wouldnt want to do any math with our computers let's be honest programming stopped being math a decade or so ago, now it's all just bashing poo poo together like cavemen
|
# ? Apr 1, 2015 15:26 |
|
Subjunctive posted:"that story doesn't add up"
|
# ? Apr 1, 2015 16:06 |
|
+ to append to a list is fine but functional programmers go too far and start making up >>= and poo poo that is 1. unreadable 2. impossible to google and get documentation for
|
# ? Apr 1, 2015 16:29 |
|
|
# ? May 13, 2024 08:08 |
|
fleshweasel posted:+ to append to a list is fine but functional programmers go too far and start making up >>= and poo poo that is 1. unreadable 2. impossible to google and get documentation for https://www.haskell.org/hoogle/?hoogle=%3E%3E%3D
|
# ? Apr 1, 2015 16:31 |