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
tef
May 30, 2004

-> some l-system crap ->

multigl posted:

If your python code isnt full of try/catch/finally blocks you're doing it wrong and making Guido cry.

java programmer spotted

Adbot
ADBOT LOVES YOU

Shaggar
Apr 26, 2006
java is the only language i've used that does exceptions correctly.

Opinion Haver
Apr 9, 2007

code:
for i in xrange(20):
    print i
look at all those exceptions :qq:

tef
May 30, 2004

-> some l-system crap ->
exceptions aren't goodenough :q:

tef
May 30, 2004

-> some l-system crap ->
that's the joke

Sapozhnik
Jan 2, 2005

Nap Ghost

Shaggar posted:

java is the only language i've used that does exceptions correctly.

I know I'm probably being trolled but this is actually true

Checked exceptions are an excellent thing when they're (a) optional and (b) structured correctly (read: have a common base class if methods tend to throw three or four of them).

Java has a useful level of covariance and contravariance as well, which is nice.

I just don't like duck typing in general. I mean, strong typing turns a big class of runtime errors into compile errors for not too much hassle, those types give you hyperlinks around the codebase for free, and it's just easier to see what's going on and what the collaborators are in general.

I'm trying to fix some stupid loving Python library at the moment and having types in the signatures would be really loving useful, since I can look at a line of code like butt.poke() and have a reasonable chance of actually finding where the implementation of poke() is located.

Basically Python is cute but I'm not convinced it scales. Sometimes repetition is a necessary price for clarity, as long as the compiler enforces the correctness of that repetition I don't see what's wrong with it.

tef
May 30, 2004

-> some l-system crap ->
http://www.artima.com/intv/handcuffs.html :toot:

Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror
yeah strong typing rules i totally want my code to have more errors

Shaggar
Apr 26, 2006

this is wrong and one of the things i really dont like about c#

Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror
it is just SO much more convenient when my computer nitpicks at my code with sperglike intensity instead of just handling all that poo poo for me

Shaggar
Apr 26, 2006

Mr Dog posted:

I know I'm probably being trolled but this is actually true

Checked exceptions are an excellent thing when they're (a) optional and (b) structured correctly (read: have a common base class if methods tend to throw three or four of them).

Java has a useful level of covariance and contravariance as well, which is nice.

I just don't like duck typing in general. I mean, strong typing turns a big class of runtime errors into compile errors for not too much hassle, those types give you hyperlinks around the codebase for free, and it's just easier to see what's going on and what the collaborators are in general.

I'm trying to fix some stupid loving Python library at the moment and having types in the signatures would be really loving useful, since I can look at a line of code like butt.poke() and have a reasonable chance of actually finding where the implementation of poke() is located.

Basically Python is cute but I'm not convinced it scales. Sometimes repetition is a necessary price for clarity, as long as the compiler enforces the correctness of that repetition I don't see what's wrong with it.

ya its no trolling. java execeptions work great and are super easy to use and understand.

tef
May 30, 2004

-> some l-system crap ->

Mr Dog posted:

I know I'm probably being trolled but this is actually true

you're like a mini shaggar except you use c++/java instead of c#/java

quote:

Checked exceptions are an excellent thing when they're (a) optional

i.e. not checked

quote:

Basically Python is cute but I'm not convinced it scales.


maybe python isn't the best language to write million loc middleware in. who knew.

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

tef posted:

maybe python isn't the best language to write million loc middleware in. who knew.

no language is the best for a million loc project

projects like that don't deserve to exist

if you can't be succinct about your ideas then it's a bad idea

Sapozhnik
Jan 2, 2005

Nap Ghost
there is no way in hell i would use c++ for anything willingly. ever

c is an altogether different story

optional as in some exceptions can be checked and some exceptions can be unchecked because they represent different categories of exceptional condition

and in either case exceptions should be exceptional. i.e. it should be possible to use a program in every possible intended way without exceptions being thrown inside it, anything else is just incredibly lazy poo poo design.

also not all large software is middleware and separation of concerns is a thing so i'd rather not learn how an entire gigantic codebase works if i just want to alter some small piece of it

(cute is probably an overly negative and dismissive adjective to use to describe a programming language. pretend I said "elegant")

Sweeper
Nov 29, 2007
The Joe Buck of Posting
Dinosaur Gum

BonzoESC posted:

no language is the best for a million loc project

projects like that don't deserve to exist

if you can't be succinct about your ideas then it's a bad idea

Some things just require a lot of code

GameCube
Nov 21, 2006

Tiny Bug Child posted:

it is just SO much more convenient when my computer nitpicks at my code with sperglike intensity instead of just handling all that poo poo for me

i know this is trolling but lol, this is like when my intro to C prof suggested that we compile with -Wall and my first reaction was "but it still compiles, why would i want it to complain at me like that?"

JawnV6
Jul 4, 2004

So hot ...
i haven't had that feeling of six hours of debug coming back to the slow realization of "Ohhh... THAT'S what that warning meant.." biting me in the rear end in quite some time

tef
May 30, 2004

-> some l-system crap ->

Mr Dog posted:

anything else is just incredibly lazy poo poo design.

no true exception

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

Sweeper posted:

Some things just require a lot of code

yeah but not a million lines

the examples are always poo poo like controllers for physical processes (automotive ECUs, rocketry controllers, etc) but behind the "million lines of C" is a few thousand lines of matlab or something that actually compiles to the million lines

facebook compiles to 1.5gb of binary but you can bet it's not anywhere near 1.5gb of php source or even 1.5gb of C++ intermediate code

what you have to do is design a language that makes solving your problem succinct and straightforward, and it turns out java and xml are not that language

Dr. Honked
Jan 9, 2011

eat it you slaaaaaaag
..\GameCode\Game\FuckPiss.h:38: warning: dr. honked is about to bust a chair over your head because you are a lovely coder

duTrieux.
Oct 9, 2003

Dr. Honked posted:

..\GameCode\Game\FuckPiss.h:38: warning: dr. honked is about to bust a chair over your head because you are a lovely coder

"it's for the best. he is a doctor."

trex eaterofcadrs
Jun 17, 2005
My lack of understanding is only exceeded by my lack of concern.

BonzoESC posted:

what you have to do is design a language that makes solving your problem succinct and straightforward, and it turns out java and xml are not that language

if you dont write programs to write programs for you you are misusing the computer

Shaggar
Apr 26, 2006
java and xml both own

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

trex eaterofcadrs posted:

if you dont write programs to write programs for you you are misusing the computer

coaxmetal
Oct 21, 2010

I flamed me own dad
python uses exceptions for control-flow sometimes. It works. Takes a bit of getting used to if you are used to thinking of exceptions as always bad instead of just another tool.

Shaggar
Apr 26, 2006
exceptions as flow control is idiotic.

Shaggar
Apr 26, 2006
so it fits in well with the rest of python

Opinion Haver
Apr 9, 2007

Shaggar posted:

exceptions as flow control is idiotic.

i too think deliberately introducing race conditions into my code by calling has_next() and then next() is a good idea

Shaggar
Apr 26, 2006
idk how that would create a race condition (unless ur talking about some python specific [aka wrong] implementation of iterators)

Dr. Honked
Jan 9, 2011

eat it you slaaaaaaag
if that can cause a race condition in python, i'll just stop using python, that's wack as hell

Opinion Haver
Apr 9, 2007

Shaggar posted:

idk how that would create a race condition (unless ur talking about some python specific [aka wrong] implementation of iterators)

your iterator models something to do with some kind of externally-changeable state like io. you call has_next() to check whether there's another thing, it says 'yeah', then it goes away by the time you call next()

Dr. Honked
Jan 9, 2011

eat it you slaaaaaaag
surely you buffer poo poo like that?

Shaggar
Apr 26, 2006

yaoi prophet posted:

your iterator models something to do with some kind of externally-changeable state like io. you call has_next() to check whether there's another thing, it says 'yeah', then it goes away by the time you call next()

concurrent modification exceptions are runtime exceptions, not flow control. it would also be an extremely wierd design where such an exception is not a result of a defect in your code. ex:

Dr. Honked posted:

surely you buffer poo poo like that?

JawnV6
Jul 4, 2004

So hot ...
i think single threaded, isn't the entire world also like that!??!?

Shaggar
Apr 26, 2006
nope.

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

JawnV6 posted:

i think single threaded, isn't the entire world also like that!??!?

no, but fortunately there's abstraction layers to allow you to reason synchronously about a concurrent world

threads with shared state are not that abstraction

JawnV6
Jul 4, 2004

So hot ...
check()
use()

is seriously begging for your code to break

Shaggar
Apr 26, 2006
lol. maybe if you use a bad language

GameCube
Nov 21, 2006

just surround everything with mutex locks and call it a day

yes i use c++, how did you know

Adbot
ADBOT LOVES YOU

TOO SCSI FOR MY CAT
Oct 12, 2008

this is what happens when you take UI design away from engineers and give it to a bunch of hipster art student "designers"

Dr. Honked posted:

surely you buffer poo poo like that?
Iterators are just functions, which means they can do anything (read from the network, spawn threads, call exit(), etc). You can't buffer them.

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