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.
 
  • Post
  • Reply
Captain Foo
May 11, 2004

we vibin'
we slidin'
we breathin'
we dyin'

Bloody posted:

Swift is a bad language for idiots, hth

it doesn't really

Adbot
ADBOT LOVES YOU

abraham linksys
Sep 6, 2010

:darksouls:
swift is an almost certainly easier-to-learn language than objective C, and arguably "better" in many aspects

idk how it stands next to other languages, but in the context of "the new iOS and OS X language," it's pretty decent

Condiv
May 7, 2008

Sorry to undo the effort of paying a domestic abuser $10 to own this poster, but I am going to lose my dang mind if I keep seeing multiple posters who appear to be Baloogan.

With love,
a mod


Subjunctive posted:

google put out a preview of Lollipop, including their new VM, ART. they tout its AOT compiler, which is intended to improve app startup speed.

3 of the 4 top Android apps start up more slowly, visibly so on the mid-range phone I saw.

not at all surprising. JITs are good, and AOT compilation isn't done in java cause it actually produces slower code. a lot of google's dalvik mistakes were discovered and solved by sun in fact. i guess google just doesn't research poo poo cause that slows down their wheel reinventing.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Condiv posted:

JITs are good, and AOT compilation isn't done in java cause it actually produces slower code.

JITs can be good, but Dalvik is not. I'm sure ART produces much better code (like interprocedural optimizations), since Dalvik was very limited in what it produced. The problems are in the runtime, apparently.

but my real point was that if you're going to advertise faster startup as a big win, and 3 of your top 4 apps get noticeably slower, maybe you check that earlier.

the GC improvements are very welcome though.

Shaggar
Apr 26, 2006
I wonder how long it will take before they realize they should have just licensed hotspot from the beginning

Notorious b.s.d.
Jan 25, 2003

by Reene

Shaggar posted:

I wonder how long it will take before they realize they should have just licensed hotspot from the beginning

about two years ago

when oracle sued their rear end

Notorious b.s.d.
Jan 25, 2003

by Reene

Condiv posted:

not at all surprising. JITs are good, and AOT compilation isn't done in java cause it actually produces slower code. a lot of google's dalvik mistakes were discovered and solved by sun in fact. i guess google just doesn't research poo poo cause that slows down their wheel reinventing.

reminder: sun had already had a sophisticated non-hotspot jvm designed for devices resembling the early android handsets. (not that wretched j2me stuff, a real jit jvm)

google talked to sun at the time but chose not to license it because they thought they could save money and somehow not get sued

tef
May 30, 2004

-> some l-system crap ->

Notorious b.s.d. posted:

google talked to sun at the time but chose not to license it because they thought they could save money and somehow not get sued

the legal notes in particular show this to be googles intent "we don't want to license java because we'll be forced to have interoperability with existing java apps" then "lol we can copy your stuff for interoperability"

Max Facetime
Apr 18, 2009

rjmccall posted:

:supaburn:

on top of what everybody else said, the lambda-calc syntax also reinforces my point about the essential similarity of the two kinds of abstraction, instead of making them look completely different

that's very "neat-o" and sure to get a hearty laugh while sampling the latest imported sugar-free lemon-pops with the peers or whatever the professors do for fun...

but for someone not familiar with the lambda notation it all looks the same to begin with!

rjmccall posted:

also, lambda syntax is hilariously varied between real languages, and assuming that anybody is going to recognize one in particular, especially's java's, is a bad way to go

also, you are literally so damaged by java that you can't stop yourself from putting unnecessary statics in your pseudocode, that is some shameful poo poo

harrumph, writing "static" is lot shorter and a lot less vague than "lambda-calc syntax"

heck, make it "public static" and I bet everyone will immediately know which syntax will follow ;)

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

I always assumed that type theory stuff looked like set theory stuff for a simple reason, but I am a math peasant.

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

Subjunctive posted:

I always assumed that type theory stuff looked like set theory stuff for a simple reason, but I am a math peasant.

type theory is very closely related to certain forms of set theory, in both a broad and specific way

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

Captain Foo posted:

yo in the arse technica review of yosemite there was a mostly glowing review of swift, i don't know enough about programming to know what they were really talking about but something about it felt very off, can someone explain

it's somewhere between c# and rust

regardless of what you may think of that, i think we can all agree it's worlds better than objc

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...
and i kind of like objc, but that's clearly stackholm syndrome

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Malcolm XML posted:

type theory is very closely related to certain forms of set theory, in both a broad and specific way

right, so I don't know why it would make sense for type theory discussion syntax to closely resemble some production programming language.

also, having a type theory discussion anchored in something that resorts to type erasure is like holding an early childhood development conference in Aatrek's living room

Notorious b.s.d.
Jan 25, 2003

by Reene

Subjunctive posted:

also, having a type theory discussion anchored in something that resorts to type erasure is like holding an early childhood development conference in Aatrek's living room

not a fan of haskell?

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Notorious b.s.d. posted:

not a fan of haskell?

not that part of it especially

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

Notorious b.s.d. posted:

not a fan of haskell?

ehhh u can use Data.Dynamic to keep type information around at runtime

I mean lots of langs end up erasing type info at runtime. U need it to make certain type systems work, like dependent types would be v slow w/o some sort of aggressive erasure of information.

brap
Aug 23, 2004

Grimey Drawer
people rage on type erasure but it's not that big a deal. Generic types are mostly to keep you from loving up in your source. after you compile, it doesn't matter as much.

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

fleshweasel posted:

people rage on type erasure but it's not that big a deal. Generic types are mostly to keep you from loving up in your source. after you compile, it doesn't matter as much.

have you heard of this amazing concept called "reflection"

Soricidus
Oct 21, 2010
freedom-hating statist shill

Dessert Rose posted:

have you heard of this amazing concept called "reflection"
reflection has a few legitimate uses, but a lot of the time it means someone couldn't figure out the right way to do something so they're trying to write plang code instead. it should in no way be a primary concern when making language design decisions.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Dessert Rose posted:

have you heard of this amazing concept called "reflection"

or distinguish-catch-of-parameterized-type, which Java fucks up

Sapozhnik
Jan 2, 2005

Nap Ghost
you keep banging that drum, why exactly would you want to have a type-parameterised exception anyway? like, can you give a concrete example?

not that i'm saying you're wrong, it is definitely a blind spot in the type system that's only there due to legacy compatibility concerns

brap
Aug 23, 2004

Grimey Drawer
type erasure isn't good but it's also not s reason to throw a poo poo fit is all I'm sayin

Shaggar
Apr 26, 2006

Mr Dog posted:

you keep banging that drum, why exactly would you want to have a type-parameterised exception anyway? like, can you give a concrete example?

not that i'm saying you're wrong, it is definitely a blind spot in the type system that's only there due to legacy compatibility concerns

the scenario is you want to handle the exception w/ one type this way but the same exception w/ another type a different way. that way you don't need a different exception type to house each interior type

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Mr Dog posted:

you keep banging that drum, why exactly would you want to have a type-parameterised exception anyway? like, can you give a concrete example?

not that i'm saying you're wrong, it is definitely a blind spot in the type system that's only there due to legacy compatibility concerns

to avoid having to if (wrappedError.inner instanceof MyError) and rethrowing -- re wrapping and rethrowing if you don't want to lose information, actually.

I'm not saying that type erasure is a fatal flaw, but given java's version using it for a type theory conversation seems weak

(I also don't like that you can't break on Generic<Parameter>.method without catching all specializations. I don't think the debugger can even help you filter after the fact, but maybe.)

tef
May 30, 2004

-> some l-system crap ->

Shaggar posted:

the scenario is you want to handle the exception w/ one type this way but the same exception w/ another type a different way. that way you don't need a different exception type to house each interior type

eh java's designers got exceptions right.

Shaggar
Apr 26, 2006
yeah I'm fine w/ how it works now that was the only scenario I could think of.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Shaggar posted:

the scenario is you want to handle the exception w/ one type this way but the same exception w/ another type a different way. that way you don't need a different exception type to house each interior type

sure, but then why a different type for every exterior type?

anyway, it annoys me disproportionately. I need to find a new Java gimmick; inability to break on locals isn't going to suffice.

Shaggar
Apr 26, 2006
there was one scenario where I was legitimately peeved by java's type erasure but I've forgotten what it was and it didn't matter in the end.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

it's also important to remember that I have a lot of wrong opinions

gonadic io
Feb 16, 2011

>>=
It interacts a bit weirdly with generics, as per here.

The most glaring one is that
Java code:
String[] strings = new String[10];
Object[] objects = strings;
objects[0] = new Object();
compiles but throws a runtime ArrayStoreException whereas

Java code:
Vector<String> strings = new Vector<String>(10);
Vector<Object> objects = (Vector<Object>)strings;
objects.add(new Object());
won't compile. it's not really a problem as such, just a weird inconsistent gotcha of the kind that make php such a problem

gonadic io
Feb 16, 2011

>>=
Of course there's also the point that Java's generics are an appalling excuse for polymorphism but part of the problem was caused by, you guessed it, type erasure

Brain Candy
May 18, 2006

if you use enums & generics in java for things it'll annoy you p. quickly that you need to smuggle the type information everywhere as a Class

Brain Candy
May 18, 2006


this would even be okay because don't use arrays (or Vector), thanks

but this has a crappy interaction with varargs. so varargs are implemented as an array

whee(int... junk) is the same as whee(int[] junk) and have the same signature

well, what if if you don't want to use a primitive

java arrays have a type smuggled into them to check what gets inserted. this is v. important when you use generic varargs, because it means that there is no possible way for a generic array to be created at run time

so <T> whee(T... junk) decays to whee(Object... junk)

whoops

tef
May 30, 2004

-> some l-system crap ->

Subjunctive posted:

sure, but then why a different type for every exterior type?

anyway, it annoys me disproportionately. I need to find a new Java gimmick; inability to break on locals isn't going to suffice.

defensive copying

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

tef posted:

defensive copying

idgi

Brain Candy
May 18, 2006

if i have a function that takes a list I'm probably going to be copying that list because mutable by default is awful

triple sulk
Sep 17, 2014



Has anyone here personally been using Go at all? I've started picking some of it up while messing around with Revel and I guess I don't hate it but it sure feels like you're fighting against a bunch of things while you use it. I guess that's something to be expected though.

Zombywuf
Mar 29, 2008

It's kinda funny that C++ is still the rightest about generics.

Adbot
ADBOT LOVES YOU

FamDav
Mar 29, 2008

Zombywuf posted:

It's kinda funny that C++ is still the rightest about generics.

rust is better but thats because it effectively has concepts

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply