Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Nomnom Cookie
Aug 30, 2009



uG posted:

operator overloading rules as long as im the one doing it

Adbot
ADBOT LOVES YOU

Pollyanna
Mar 5, 2005

Milk's on them.


Bloody posted:

you wanna know an awful lang?

object-oriented matlab. why am i writing this. someone kill me pleas

hahhahahhahahahahhahahahahahhahahahahhahahahhahahhahahahahahhahahahahaahahahhahahahahhahahahahahahahahahahha

uG
Apr 23, 2003

by Ralp
perl goatse op supremacy =()=

Pollyanna
Mar 5, 2005

Milk's on them.


are you working with images or csvs? if not dont use matlab

Nomnom Cookie
Aug 30, 2009



Notorious b.s.d. posted:

it's stupid and bad because it's inconsistent

even the designers of java (hallowed be their names) occasionally gently caress it up

Type erasure

Notorious b.s.d.
Jan 25, 2003

by Reene

Bloody posted:

wait so now there is a type ButtFart that's secretly a System.Collections.Generic.List<KeyValuePair<Butt, Fart>>;? goddamn that owns, i am a terrible programmer

yep.

and it does own.

Notorious b.s.d.
Jan 25, 2003

by Reene

Nomnom Cookie posted:

Type erasure

type erasure was an engineering problem not a language design problem. an implementation detail.

but yeah they hosed that one up bigtime

Bloody
Mar 3, 2013

Pollyanna posted:

are you working with images or csvs? if not dont use matlab

im working with academia

Pollyanna
Mar 5, 2005

Milk's on them.


Bloody posted:

im working with academia

im so sorry.

BONGHITZ
Jan 1, 1970

Pollyanna posted:

hello, my name is pollyanna,

hello

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

uG posted:

operator overloading rules as long as im the one doing it

it is really fun if it's some throwaway project no one else will be using

when i put my throwaway projects up on github and they get forked because of how cool+userful they are, is when it becomes a problem

Zlodo
Nov 25, 2006

Notorious b.s.d. posted:

type erasure was an engineering problem not a language design problem. an implementation detail.

but yeah they hosed that one up bigtime

I'm sure its a great relief when you get bitten in the rear end by it
"no worry mate just an implementation detail"

Nomnom Cookie
Aug 30, 2009



Notorious b.s.d. posted:

type erasure was an engineering problem not a language design problem. an implementation detail.

but yeah they hosed that one up bigtime

Go back and read the spec on erasure. It might have been motivated by engineering but it's a language (mis) feature.

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe
I must have read that poo poo like 3 times and I still don't get why it's a big loving deal.

Why couldn't Java just have schism'd into two versions, or even just have included both runtimes, a default one to support old lovely code a new one that supports types? I'm guessing it was just :effort: but it would have been the best way to transition to the newer runtime until all those old jars were recompiled or abandoned for newer things while at the same time still supporting super old poo poo.

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band
people get something that works, and they don't want to change that if they can ever avoid it

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe
Then why release new versions of Java then?

Notorious b.s.d.
Jan 25, 2003

by Reene

Zlodo posted:

I'm sure its a great relief when you get bitten in the rear end by it
"no worry mate just an implementation detail"

Nomnom Cookie posted:

Go back and read the spec on erasure. It might have been motivated by engineering but it's a language (mis) feature.

well the motivation is what matters here

when java was initially designed, they made a ton of good choices in a green grass world, where they got to define everything from scratch

type erasure was a compromise among competing concerns in a world with millions of lines of legacy code. i think they screwed the pooch but i can see why they were tempted by their bad solution

Notorious b.s.d.
Jan 25, 2003

by Reene

Hard NOP Life posted:

I must have read that poo poo like 3 times and I still don't get why it's a big loving deal.

Why couldn't Java just have schism'd into two versions, or even just have included both runtimes, a default one to support old lovely code a new one that supports types? I'm guessing it was just :effort: but it would have been the best way to transition to the newer runtime until all those old jars were recompiled or abandoned for newer things while at the same time still supporting super old poo poo.

.net 2.0 just said "gently caress it" and that seems to have been the right solution. 1.0/1.1 code still ran but it was a pain in the rear end to migrate things, and, well, that seems to have worked out ok.

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

Hard NOP Life posted:

Then why release new versions of Java then?

people also want new features

they want new stuff and they want to never give up their old stuff

uG
Apr 23, 2003

by Ralp

prefect posted:

people also want new features

they want new stuff and they want to never give up their old stuff

perl5 livin the dream

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

uG posted:

perl5 livin the dream

i wrote a tiny little perl script this afternoon

:feelsgood:

Notorious b.s.d.
Jan 25, 2003

by Reene

uG posted:

perl5 livin the dream

dude p5 is alive and well

on thursday i'm gonna go see the Moose guy talk about his proposed Moose-like additions to the p5 core, it's gonna rule

Mr SuperAwesome
Apr 6, 2011

im from the bad post police, and i'm afraid i have bad news

Notorious b.s.d. posted:

it's a type alias, and if you never use them, you are writing some really ugly C#

what, as in "i don't like typing System.Collections.Generic.List<KeyValuePair<Butt, Fart>>;"

- why wouldn't u just including System.Collections.Generics making it List<KeyValuePair<Butt,Fart>>;
- why wouldn't u use a dictionary
- why wouldn't you use var 99% of the time except for instantiating stuff

like the only way this seems to make sense is if you're doing TypeOf's all over the place or something. or if you have intellisense turned off for some reason

USSMICHELLEBACHMAN posted:

that's why you do all your math stuff in c and then turn it back into an object for whatever objectey stuff it needs to do

you're not supposed to do math with your objects
what about currencies (decimal)

(http://stackoverflow.com/questions/421463/should-i-use-nsdecimalnumber-to-deal-with-money )

Notorious b.s.d.
Jan 25, 2003

by Reene

tbh i don't even like operators that much for numbers.

i would be perfectly happy with a language that had explicit method names even for math

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Notorious b.s.d. posted:

tbh i don't even like operators that much for numbers.

i would be perfectly happy with a language that had explicit method names even for math

mods namechange to method man

Quebec Bagnet
Apr 28, 2009

mess with the honk
you get the bonk
Lipstick Apathy

Notorious b.s.d. posted:

tbh i don't even like operators that much for numbers.

i would be perfectly happy with a language that had explicit method names even for math

i'm genuinely curious what kind of work you do that would lead to this conclusion

fritz
Jul 26, 2003

uG posted:

perl5 livin the dream

i got a lead on a place thats looking for a data guy but its perl and matlab and i havent done serious perl since literally 2004

fritz
Jul 26, 2003

Notorious b.s.d. posted:

i would be perfectly happy with a language that had explicit method names even for math

what the gently caress


one of the things i hate about numpy is the difference between arrays and matrices and how sometimes * means pointwise multiplication and how sometimes * means matrix multiplication, but you cant just use .dot() all the time because its slow as balls on matrices (or one of those things is slow, i dont remember which)

uG
Apr 23, 2003

by Ralp

Notorious b.s.d. posted:

dude p5 is alive and well

on thursday i'm gonna go see the Moose guy talk about his proposed Moose-like additions to the p5 core, it's gonna rule

ironically that guy went on all last year about how perl is dead, a dead end, the detroit of scripting languages, etc

uG
Apr 23, 2003

by Ralp
PerlMotion, a toolchain for iOS and OS X development using the Perl5 programming language, is whats really up :cool:

Workaday Wizard
Oct 23, 2009

by Pragmatica
how about a happy medium: prefix overloaded operators with something like .+ .- .* ./

Shaggar
Apr 26, 2006
* overloads . *

uG
Apr 23, 2003

by Ralp
prefixing overloaded operators with something removes almost all the usefulness of it

Zlodo
Nov 25, 2006

USSMICHELLEBACHMAN posted:

lol doing math with objects is dumb wtf steveE??

theres nothing wrong with having a wide enough definition of "object" that encompasses types
unless your using a j-lang where they insist that every object must be heavy and costly and have no notion of passing things by value

sometimes you manipulate mathematical objects other than scalars and theres no reason you should have to use a diff syntax when doing calculations on them

Shaggar
Apr 26, 2006
operator overloading only seems useful to people who've never worked w/ other people. mostly p-langers who want to people able to alias a random method to an operator so they can type less. its stupid obfuscation that serves no purpose.

Shaggar
Apr 26, 2006
"oh but for this one highly special needs math thing it actually makes sense!"
well too bad. we aren't breaking the language to suit your stupid autism.

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

lol idfk this is the terrible programmer thread

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Shaggar posted:

"oh but for this one highly special needs math thing it actually makes sense!"
well too bad. we aren't breaking the language to suit your stupid autism.

everyone who programs has special needs though

Notorious b.s.d.
Jan 25, 2003

by Reene

Zlodo posted:

theres nothing wrong with having a wide enough definition of "object" that encompasses types
unless your using a j-lang where they insist that every object must be heavy and costly and have no notion of passing things by value

java is mandatory pass-by-value jackass
there is literally no way to pass by reference

Zlodo posted:

sometimes you manipulate mathematical objects other than scalars and theres no reason you should have to use a diff syntax when doing calculations on them

except that programming is not math

using mathematical notation for concrete operations on data types can be unhelpful when the abstractions don't hold

e.g. most things with integers and anything with floating point ever

Adbot
ADBOT LOVES YOU

Zlodo
Nov 25, 2006

Notorious b.s.d. posted:

java is mandatory pass-by-value jackass
there is literally no way to pass by reference

idc my point is that it is actually always passed by reference from a low level point of view (as opposed as being directly pushed onto the stack or even across multiple registers like when objects are passed by value in c++) which in turns makes every class no matter how small such as a mathematical vector inefficient as hell even though there should be no reason objects cant be lightweight and still have methods or overloaded operators


so it precludes a lot of cool things because theres this language limitation where every object is heavyweight as it has to be allocated on its own on the heap

quote:

except that programming is not math
your opening quite the can of worms there mate hope that no functional programmer hear you

  • Locked thread