|
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
|
# ? May 17, 2012 16:47 |
|
|
# ? May 11, 2024 15:56 |
|
java is the only language i've used that does exceptions correctly.
|
# ? May 17, 2012 16:50 |
|
code:
|
# ? May 17, 2012 16:52 |
|
exceptions aren't goodenough
|
# ? May 17, 2012 16:53 |
|
that's the joke
|
# ? May 17, 2012 16:56 |
|
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.
|
# ? May 17, 2012 17:04 |
|
http://www.artima.com/intv/handcuffs.html
|
# ? May 17, 2012 17:07 |
|
yeah strong typing rules i totally want my code to have more errors
|
# ? May 17, 2012 17:08 |
|
tef posted:http://www.artima.com/intv/handcuffs.html this is wrong and one of the things i really dont like about c#
|
# ? May 17, 2012 17:09 |
|
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
|
# ? May 17, 2012 17:10 |
|
Mr Dog posted:I know I'm probably being trolled but this is actually true ya its no trolling. java execeptions work great and are super easy to use and understand.
|
# ? May 17, 2012 17:10 |
|
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.
|
# ? May 17, 2012 17:11 |
|
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
|
# ? May 17, 2012 17:18 |
|
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")
|
# ? May 17, 2012 17:19 |
|
BonzoESC posted:no language is the best for a million loc project Some things just require a lot of code
|
# ? May 17, 2012 17:23 |
|
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?"
|
# ? May 17, 2012 17:23 |
|
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
|
# ? May 17, 2012 17:25 |
|
Mr Dog posted:anything else is just incredibly lazy poo poo design. no true exception
|
# ? May 17, 2012 17:28 |
|
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
|
# ? May 17, 2012 17:28 |
|
..\GameCode\Game\FuckPiss.h:38: warning: dr. honked is about to bust a chair over your head because you are a lovely coder
|
# ? May 17, 2012 17:29 |
|
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."
|
# ? May 17, 2012 17:37 |
|
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
|
# ? May 17, 2012 17:49 |
|
java and xml both own
|
# ? May 17, 2012 17:50 |
|
trex eaterofcadrs posted:if you dont write programs to write programs for you you are misusing the computer
|
# ? May 17, 2012 17:52 |
|
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.
|
# ? May 17, 2012 18:07 |
|
exceptions as flow control is idiotic.
|
# ? May 17, 2012 18:16 |
|
so it fits in well with the rest of python
|
# ? May 17, 2012 18:16 |
|
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
|
# ? May 17, 2012 18:30 |
|
idk how that would create a race condition (unless ur talking about some python specific [aka wrong] implementation of iterators)
|
# ? May 17, 2012 18:31 |
|
if that can cause a race condition in python, i'll just stop using python, that's wack as hell
|
# ? May 17, 2012 18:33 |
|
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()
|
# ? May 17, 2012 18:34 |
|
surely you buffer poo poo like that?
|
# ? May 17, 2012 18:37 |
|
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?
|
# ? May 17, 2012 18:41 |
|
i think single threaded, isn't the entire world also like that!??!?
|
# ? May 17, 2012 18:42 |
|
nope.
|
# ? May 17, 2012 18:44 |
|
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
|
# ? May 17, 2012 18:46 |
|
check() use() is seriously begging for your code to break
|
# ? May 17, 2012 18:48 |
|
lol. maybe if you use a bad language
|
# ? May 17, 2012 18:49 |
|
just surround everything with mutex locks and call it a day yes i use c++, how did you know
|
# ? May 17, 2012 18:52 |
|
|
# ? May 11, 2024 15:56 |
|
Dr. Honked posted:surely you buffer poo poo like that?
|
# ? May 17, 2012 19:11 |