|
Internaut! posted:where does as3 fall on the verbosity scale its ecmascript
|
# ? May 28, 2012 20:49 |
|
|
# ? May 8, 2024 05:53 |
|
rotor posted:its ecmascript
|
# ? May 28, 2012 20:52 |
|
i think i saw a porno like that once
|
# ? May 28, 2012 20:53 |
|
man I wish. that trench owns.
|
# ? May 28, 2012 20:53 |
|
ahhh spiders posted:. . . seriously? yes I'm seriously asking rotor if he feels as3 is verbose or not by his standards but please make a few more zero content posts about it
|
# ? May 28, 2012 21:07 |
|
Internaut! posted:yes I'm seriously asking rotor if he feels as3 is verbose or not by his standards but please make a few more zero content posts about it your question makes no sense
|
# ? May 28, 2012 21:18 |
|
i mean, if you had actually read the post explaining it, you would have understood but as usual you've cherrypicked something that allows you to be dismissive and abrasive
|
# ? May 28, 2012 21:24 |
|
ahhh spiders posted:you've cherrypicked something that allows you to be dismissive and abrasive and that is my gimmick
|
# ? May 28, 2012 21:32 |
|
its the tech support survival defense "maybe if im a big enough rear end in a top hat people will just google it instead of calling me"
|
# ? May 28, 2012 21:36 |
|
Resplendent Spiral posted:its the tech support survival defense that explains everything about him then
|
# ? May 28, 2012 21:37 |
|
Resplendent Spiral posted:its the tech support survival defense please tell me this works
|
# ? May 28, 2012 21:40 |
|
Internaut! posted:yes I'm seriously asking rotor if he feels as3 is verbose or not by his standards but please make a few more zero content posts about it its about medium I guess
|
# ? May 28, 2012 22:13 |
|
rotor posted:why? what problem does highly meaning-dense code solve? there was that one study once that basically said you can write the same number of lines of code per day and make the same amount of fuckups per line of code no matter whether it's as vacuous as asm or as dense as apl so the obvious answer to reduce the number of lines of code that have to be written so you can finish faster and with a lower absolute number of bugs big_list_of_strings.sort_by(&:length) is less error prone than sorting by strlen is less error prone than sorting by dereferencing pointers to strings and counting the chars before a null terminator without the benefit of c
|
# ? May 29, 2012 06:07 |
|
BonzoESC posted:there was that one study once that basically said you can write the same number of lines of code per day and make the same amount of fuckups per line of code no matter whether it's as vacuous as asm or as dense as apl i find that very hard to believe, unless you're talking about syntax poo poo the compiler catches
|
# ? May 29, 2012 06:10 |
|
rotor posted:i find that very hard to believe, unless you're talking about syntax poo poo the compiler catches I suspect it's the amount of things the programmer has to remember. If sorting a list involves remembering which AbstractSortAlgorithmFactory to use and how to use it, plus remembering the correct way to define their ComparsionVistorFactory then the chance of a gently caress up is much higher.
|
# ? May 29, 2012 12:34 |
|
thats something completely different though and if you're using java then the class names are descriptive. If you cant figure out what class ur supposed to use for something ur probably an idiot or someone pulled a P Languge on you and hosed up some class names to "save on typing" or something equally retarded. ex: if you want to order List<Butt> butts by left cheek size you'd use a LeftCheekSizeButtComparator (which implements Comparator<Butt>) Java code:
|
# ? May 29, 2012 14:51 |
|
yeah I don't see a problem with this, there's zero chance you could misunderstand the meaning of that code, and a good editor would generate 80+% of that line for you anyway giving you "brevity of effort" while eliminating the opportunity for spelling mistakes inherent in descriptive variable/function names wrap it up etc
|
# ? May 29, 2012 15:36 |
|
i fall asleep halfway through reading any objective C method call
|
# ? May 29, 2012 15:44 |
|
Internaut! posted:yeah I don't see a problem with this, there's zero chance you could misunderstand the meaning of that code, and a good editor would generate 80+% of that line for you anyway giving you "brevity of effort" while eliminating the opportunity for spelling mistakes inherent in descriptive variable/function names well you're looking at one line in isolation, if you have 1000 of those lines it gets mentally tedious to read. also that probably one of the cleanest corners of java and not representative of the language as a whole.
|
# ? May 29, 2012 15:55 |
|
tinselt0wn posted:i fall asleep halfway through reading any objective C method call NSarcolepsy
|
# ? May 29, 2012 16:21 |
|
Fren posted:NSarcolepsy
|
# ? May 29, 2012 16:35 |
|
Shaggar posted:thats something completely different though and if you're using java then the class names are descriptive. If you cant figure out what class ur supposed to use for something ur probably an idiot or someone pulled a P Languge on you and hosed up some class names to "save on typing" or something equally retarded. Yeah, I'll just memorize every class that implements Comparator<>. While of course memorising the Comparator<> interface for when I need to implement my own. Then I will cut off my own hands.
|
# ? May 29, 2012 16:40 |
|
the comparator interfacecode:
|
# ? May 29, 2012 16:59 |
|
Zombywuf posted:Yeah, I'll just memorize every class that implements Comparator<>. While of course memorising the Comparator<> interface for when I need to implement my own. u dont memorize classes u retaqrd. u memorize concepts (like comparators) and when you need a comparator you look to see if someone in ur project has already written one and if they arent tarded they'll have named it based on what it does. then if no ones created the comparator you want you create ur own (named properly so other people can find it in the future). i mean its fine if you've never used java and you dont know what a comparator is or what Collections is or how they work, but if ur a java dev that shits like critical (and also braindead ez).
|
# ? May 29, 2012 17:04 |
|
don't forget all the poo poo you have to boilerplate away there getting "equals" correct is non-trivial
|
# ? May 29, 2012 17:04 |
|
Shaggar posted:u dont memorize classes u retaqrd. u memorize concepts (like comparators) and when you need a comparator you look to see if someone in ur project has already written one and if they arent tarded they'll have named it based on what it does. then if no ones created the comparator you want you create ur own (named properly so other people can find it in the future). code:
Perl code:
Python code:
|
# ? May 29, 2012 17:08 |
|
Zombywuf posted:
lol thats awful
|
# ? May 29, 2012 17:08 |
|
Shaggar posted:lol thats awful how is the orange sky on your planet? do the three moons look nice today?
|
# ? May 29, 2012 17:11 |
|
Shaggar posted:lol thats awful can you elaborate on exactly why it is awful? tia
|
# ? May 29, 2012 17:12 |
|
because 1 its ordering on the natural order of butt which isnt the same as a comparator. 2 if you're using a comparator in a bunch of different locations and need to update the logic you do it inside the comparator and you're done. in your shitlanguages you'd have to search and replace for all your compares. 3 the java is far more readable than gross rear end shitlanguages
|
# ? May 29, 2012 17:15 |
|
Shaggar posted:because 1 its ordering on the natural order of butt which isnt the same as a comparator. 2 if you're using a comparator in a bunch of different locations and need to update the logic you do it inside the comparator and you're done. in your shitlanguages you'd have to search and replace for all your compares. 3 the java is far more readable than gross rear end shitlanguages if you're sorting 'em by the same field that much you put a new method on the object to be compared that returns its sort value and sort by that and a new method in a good language is much simpler than Java code:
|
# ? May 29, 2012 17:19 |
|
Shaggar posted:because 1 its ordering on the natural order of butt which isnt the same as a comparator. 2 if you're using a comparator in a bunch of different locations and need to update the logic you do it inside the comparator and you're done. in your shitlanguages you'd have to search and replace for all your compares. 3 the java is far more readable than gross rear end shitlanguages 1) Python code:
2) Do you often go around changing the total order's of numbers? 3) At least my examples fit on the screen.
|
# ? May 29, 2012 17:21 |
|
if your changing what your comparing, you will need to name the new comparator something else, and youll have to find and replace anyway. shaggargument is specious
|
# ? May 29, 2012 17:22 |
|
Ridgely_Fan posted:if your changing what your comparing, you will need to name the new comparator something else, and youll have to find and replace anyway. shaggled again
|
# ? May 29, 2012 17:24 |
|
Shaggar posted:because 1 its ordering on the natural order of butt which isnt the same as a comparator. 2 if you're using a comparator in a bunch of different locations and need to update the logic you do it inside the comparator and you're done. in your shitlanguages you'd have to search and replace for all your compares. 3 the java is far more readable than gross rear end shitlanguages 1 is a valid point since you might not always want to sort on the natural order (usually us), but at least the python sort implemention can take an optional cmp argument that specifies a comparator function. That also solves 2, or you can just put the sort in its own function. 3... is debatable. I think key=[function] and cmp=[function] is perfectly understandable unless you are really dumb. The java way works but the ability to easily sort any list by an arbitrary key is pretty cool since usually that's the kind of sorting you do anyway.
|
# ? May 29, 2012 17:25 |
|
Ronald Raiden posted:1 is a valid point since you might not always want to sort on the natural order (usually us), but at least the python sort implemention can take an optional cmp argument that specifies a comparator function. That also solves 2, or you can just put the sort in its own function. 3... is debatable. I think key=[function] and cmp=[function] is perfectly understandable unless you are really dumb. does python have both comparator sort and a schwartzian transform sort-by method
|
# ? May 29, 2012 17:28 |
|
Ridgely_Fan posted:if your changing what your comparing, you will need to name the new comparator something else, and youll have to find and replace anyway. i think what he's sayign is that if you have a comparator that adheres to an interface, and you change how things are compared, you can just change the one class and all the instances will follow suit which you could handle in python by passing around an object which implements the special method __cmp__, in which case you don't need to pass a lambda to sorted at all. it's really a question of what's pythonic, i suppose. most people just want to pass around dicts with god-knows-what in them, but if you're doing that i hope it's constrained to a method or two and not splayed all over your codebase
|
# ? May 29, 2012 17:29 |
|
BonzoESC posted:does python have both comparator sort and a schwartzian transform sort-by method shwartzian transform is considered "the old way" but yeah you can do it that way
|
# ? May 29, 2012 17:30 |
|
Zombywuf posted:1) that doesn't do anything like what he asked for loving hell you're dense. Python code:
but seriously if you find it difficult remembering the basic java interfaces like comparator then you're quite stupid, they're just loving annoying to work with.
|
# ? May 29, 2012 17:30 |
|
|
# ? May 8, 2024 05:53 |
|
Ridgely_Fan posted:shwartzian transform is considered "the old way" but yeah you can do it that way "In Python 2.4 and above, both the sorted() function and the in-place list.sort() method take a key= parameter that allows the user to provide a "key function" (like foo in the examples above). In Python 3 and above, use of the key function is the only way to specify a custom sort order (the previously-supported comparator argument was removed)." i guess that's "the new way" or maybe "the only way" now
|
# ? May 29, 2012 17:32 |