|
sarehu posted:Finding where a type is defined is easy in any case. There are other gains in maintenance when you have multiple types per file. such as?
|
# ? Jul 26, 2015 22:48 |
|
|
# ? Jun 12, 2024 07:44 |
|
Soricidus posted:such as? Having the types in the same place in a file lets you easily have it all visible on your screen. You can refactor code and move it from file to fie more incrementally.
|
# ? Jul 26, 2015 23:29 |
|
it's a shame that nobody has invented a method of displaying two things at once
|
# ? Jul 26, 2015 23:34 |
|
sarehu posted:Having the types in the same place in a file lets you easily have it all visible on your screen. You can refactor code and move it from file to fie more incrementally. wow the first claim is weak because your classes aren't going to fit on the screen at once in a single file unless they're absolutely trivial, and in that case what's wrong with just nesting them? the only downside is that it can get confusing if the nested classes are non-trivial, but we've already established that we must be talking about trivial classes. and in any case, if anything it's easier to view two classes side by side if they're in different files. i don't even know what the second sentence is trying to say. how exactly does having things in the same file make it easier to move them to different files incrementally than if they were already in different files to begin with? and in any case, refactoring code and moving it from file to file is the ide's job, not mine.
|
# ? Jul 27, 2015 00:02 |
|
sarehu posted:People aren't genetically oriented towards language design decisions like that. One choice is more productive than the other, it's not a matter of preference. Calling it a matter of preference is attractive because nobody has to be wrong and nobody's language is bad, but in fact, one choice is the wrong one and the other is better. I'm not saying in general your statement is false, there are very clear cases where one choice is better than an other and there are lots of lovely language design decisions all over the place to prove this. But in this particular instance it does feel like a preference thing and not something with a clear win as demonstrated by your weak claims to it's efficiency.
|
# ? Jul 27, 2015 00:18 |
|
rrrrrrrrrrrt posted:in what way is java *deeply* flawed? a bunch of poo poo answers so far and nobody said nulls. lol.
|
# ? Jul 27, 2015 00:36 |
|
rrrrrrrrrrrt posted:a bunch of poo poo answers so far and nobody said nulls. lol. *ding ding ding ding* thank God Java8 finally added Optional
|
# ? Jul 27, 2015 00:42 |
|
don't forget generics (and also their interactions with primitives lol) i'm the toLongBiFunction
|
# ? Jul 27, 2015 00:43 |
|
Janitor Prime posted:*ding ding ding ding* that's better but it's still not statically checked. i've already seen people return null in place of an Optional (caught in review but jfc) java desperately needs language level value types with something equivalent to using builders so writing immutable things is not so painful immutable by default would be great too, but that won't happen
|
# ? Jul 27, 2015 00:59 |
|
Notorious b.s.d. posted:early in the c# era, people did try to port the then-preeminent java build tool to .net, and nANT was the result. nANT was every bit as good as the original ant, but microsoft didn't adopt it, so it died "as good as ant" generally isn't considered a compliment
|
# ? Jul 27, 2015 01:18 |
|
when you're building stuff in visual studio its going through msbuild. msbuild loving sucks. not only is it a script like build tool, its a script like build tool where visual studio is designed to read and understand the scripts in order to present certain stuff in the UI related to the build. if this sounds confusing and stupid that's because it is. you can make lots of changes the ui wont understand. most wont break visual studio, but the changes are invisible unless you unload the project and look at the file. this can cause massive confusion if anyone picks up your project and tries to build it and poo poo works weird. they would need to understand msbuild and to check your project file for hidden build logic. this is made worse by nuget which is the official unofficial package manager of c# and visual studio. nuget could theoretically be used as just a package manager, but in reality that's not how it works. on first import nuget packages can and will make significant changes to your project files (meaning the msbuild configs). this is just as bad as it sounds with unknown changes getting shoved into your build left and right to the point where you have no idea where anything came from. what happens when you uninstall a package? who knows. it might clean up the project changes it made, it might not. even if it does, its guaranteed to break if you made any customizations to the build yourself. AND its even worse if you want to do automated builds because the way nuget is handled in visual studio is that nuget is the one loving thing they dont put into your stupid project file. nuget dependencies go into a packages file which is interpreted not by msbuild but by an internal vs component that kicks off nuget to manage packages. its awful. if you want to get nuget packages to be downloaded during automatic builds, you have to add nuget package manager steps to the build. you can do this by hand, or you can configure your project to do nuget packages in msbuild instead of visual studio. well that sounds ok, right? lol no. If you don't do this before you download any package, visual studio will get confused about what references in your project are nuget packages and which are manual imports. even though the nuget packages are listed in the packages file. This means it will try to check in nuget packages that you installed before you enabled the disabling of visual studio's build in nuget package management in favor of msbuild package management. if you are confused or don't understand you are correct. and to top it all off, nuget is an awful package manager. if you install a package that has dependencies, nuget will resolve them for you. by adding them directly to your package list as if you added them yourself. It does not handle transitive dependencies. It knows about them and will complain about them if you are missing one, but it wont try to resolve it for you. the nuget package manager UI in visual studio does not have a place for you to select a version. if you do updates, you cant select a version to update to. it always installs/updates the newest versions. this is really really awesome when doing something like upgrading from mvc3 to mvc4 because not only does the lack of proper dependency (transitive and direct) management mean you will have leftover dependencies you don't need anymore, but it goes through a massive set of scripts to update your project files, your web.config, parts of other files in your project, and loads of other stuff. its impossible to undo it without reverting the entire project in source control. it will also miss poo poo all the time during the upgrade so you'll end up with references to mvc3 version of packages in some files and your project wont run. the official fix was to add special poo poo to the web.config that basically says, "oh, heh, yeah... if you see mvc3, um, that should really be mvc4... so if you could just use mvc4 instead that would be great.. thanks" its an absolute poo poo show. if someone made a .net version of maven they could charge thousands of dollars for it per seat and people would pay and pay and pay. Shaggar fucked around with this message at 01:49 on Jul 27, 2015 |
# ? Jul 27, 2015 01:46 |
|
nuget is not comparable to maven. its probably more comparable to those weird javascript 'dependency" managers
|
# ? Jul 27, 2015 01:53 |
|
it seriously drives me loving insane because if .net had maven it would be the best platform hands down, by miles and miles and miles
|
# ? Jul 27, 2015 01:55 |
|
that retard who thinks build scripts are cool would probably like nuget and msbuild because its loads of work to get them working right for automated builds.
|
# ? Jul 27, 2015 01:55 |
|
oh my god maven is so good and I miss it more and more every day.
|
# ? Jul 27, 2015 01:56 |
|
Shaggar posted:nuget is not comparable to maven. its probably more comparable to those weird javascript 'dependency" managers sounds like bower, which is all-but-dead now that NPM is better at deduplicating its dependency tree I should mention that, with that change, NPM is now basically the perfect package manager
|
# ? Jul 27, 2015 01:59 |
|
Soricidus posted:wow They'll fit if you don't have to put methods inside the classes.
|
# ? Jul 27, 2015 02:01 |
|
abraham linksys posted:sounds like bower, which is all-but-dead... oh thank god. bower was a mess
|
# ? Jul 27, 2015 02:06 |
|
"hrm, it looks like I have a bunch of different logging apis in these dependencies. how do I fix this?" maven solution: "have maven replace every instance of those artifacts across the entire dependency tree with the relevant slf4j bridge so everything gets sent to slf4j/logback* nuget solution: "lol gently caress me I give up"
|
# ? Jul 27, 2015 02:06 |
|
one time i added two dependencies via nuget that each relied on a different version of json.net i believe nuget's solution was to just arbitrarily pick one, it didn't even tell me there was a problem
|
# ? Jul 27, 2015 02:09 |
|
Java's optional is a complete joke. basically look at swift if you want to know how to do optionals correctly
|
# ? Jul 27, 2015 02:12 |
|
nulls in java are bad but then the same is true of basically every other curly brace language Optional<> is a lovely retrofit but I'll take that over playing nullability guessing games any day
|
# ? Jul 27, 2015 02:15 |
|
sarehu posted:They'll fit if you don't have to put methods inside the classes. so what's wrong with nested classes? i haven't written java for a long time and i remember nested classes feeling generally awkward, but that's it
|
# ? Jul 27, 2015 02:22 |
|
Also lol at no mention of checked exceptions. Most java haters are clueless.
|
# ? Jul 27, 2015 02:36 |
|
checked exceptions are good
|
# ? Jul 27, 2015 02:40 |
|
Shaggar posted:it seriously drives me loving insane because if .net had maven it would be the best platform hands down, by miles and miles and miles perhaps one day, shaggar, perhaps one day
|
# ? Jul 27, 2015 02:42 |
|
shaggar i'm convinced. you should build it so i can use it with future .net projects, godbless and thanks in advance
|
# ? Jul 27, 2015 02:43 |
|
Mr Dog posted:nulls in java are bad but then the same is true of basically every other curly brace language You could maybe solve your problem if you had a NotOptional<> in tandem with Optional<> and enforced its usage and wrapped all library apis and hope you didnt make a mistake and are okay with the ridiculous boilerplate
|
# ? Jul 27, 2015 03:18 |
|
oh also no unsigned types, which they "fixed" with this poo poo https://blogs.oracle.com/darcy/entry/unsigned_api
|
# ? Jul 27, 2015 03:23 |
|
I guess you could have a project convention of assuming that everything not wrapped in Optional means that it should never be null and cross your fingers and hope for the best
|
# ? Jul 27, 2015 03:24 |
|
Is there still not an unsigned byte type just lol forever
|
# ? Jul 27, 2015 03:25 |
|
of course theyd get unsigned int in before unsigned byte lol
|
# ? Jul 27, 2015 03:26 |
|
hepatizon posted:so what's wrong with nested classes? i haven't written java for a long time and i remember nested classes feeling generally awkward, but that's it They're fine... if you want your classes to be nested.
|
# ? Jul 27, 2015 03:39 |
|
comedyblissoption posted:Optional<> does nothing to solve nullability guessing games, because every single object reference is still nullable Static analyzers can catch uses of null in packages where you've declared null off-limits Checker Framework is a thing but I haven't bothered to set that up yet.
|
# ? Jul 27, 2015 04:38 |
|
comedyblissoption posted:Is there still not an unsigned byte type are chars signed? lmao
|
# ? Jul 27, 2015 04:45 |
|
char is unsigned, which only makes the decision to make byte signed even more inexplicable
|
# ? Jul 27, 2015 05:03 |
|
Mr Dog posted:Static analyzers can catch uses of null in packages where you've declared null off-limits Yeah, my favorite part about Optional is that Eclipse still can't tell whether it's @NonNull or @Nullable, completely defeating the purpose. Stupid Oracle needs to bring @NonNull and @Nullable into the dang language specification already.
|
# ? Jul 27, 2015 05:05 |
|
msbuild as originally designed is actually kinda elegant: ideally the project file should contain nothing but a list of files associated with various tasks and some configuration settings for those tasks, with the tasks themselves defined in .net assemblies written in the .net language of your choice. unfortunately, the other 90% of msbuild is awful cancerous growths of functionality hacked in in the worst possible ways because for some reason they decided not to just tell people to write custom build tasks when they need some logic in their build system.
|
# ? Jul 27, 2015 06:28 |
|
Shaggar posted:when you're building stuff in visual studio its going through msbuild. msbuild loving sucks. not only is it a script like build tool, its a script like build tool where visual studio is designed to read and understand the scripts in order to present certain stuff in the UI related to the build. if this sounds confusing and stupid that's because it is. you can make lots of changes the ui wont understand. most wont break visual studio, but the changes are invisible unless you unload the project and look at the file. this can cause massive confusion if anyone picks up your project and tries to build it and poo poo works weird. they would need to understand msbuild and to check your project file for hidden build logic. nuget and msbuild are loving garbage and maven is the best
|
# ? Jul 27, 2015 10:14 |
|
|
# ? Jun 12, 2024 07:44 |
|
Brain Candy posted:that's better but it's still not statically checked. i've already seen people return null in place of an Optional (caught in review but jfc) upgrade null pointer exception from RuntimeException to Error imo
|
# ? Jul 27, 2015 10:21 |