Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
bioDan56227yJava is the only compiled language, that's the main reason why its significantly longer.
Also, Ruby is ❤ -
theuser47817yLocalDate date = LocalDate.now();
DateTimeFormatter format = DateTimeFormatter.ofPattern("h:m:s");
System.out.print(date.format(format)); -
@Divisionbyzero yeah. Forgot the console.log();
I'll fix that with a firmware update... -
@theuser It is missing the imports and the class declaration with the public static main method.
-
elazar10307y@bioDan but the reason you mentioned is not valid, since there are compiled, strongly typed, languages that are not nearly as verbose. In fact, most languages are not nearly as verbose :)
Perhaps what you wanted to point is "manifest typing" - requiring the programmer to declare the type of everything. This, together with the avoidance of global functions and being selective about what is imported automatically. -
bioDan56227y@elazar i understand what you are saying, and i agree there are less verbose strong typed compiled languages so overall your comment is more precise..
But when considering the most commonly used programming languages, in the battle of verbosity - interpreted languages vs. compiled languages. Who do you think wins? :) (Generally speaking ofcourse) -
elazar10307y@bioDan in general, dynamic languages*. True.
But this is mainly because they are geared towards small scale development, not large scale. Type inference does not help across module boundaries - it does not scale and does not help readability.
* (interpretation /compilation are implentation details, not properties of languages. In fact CPython compiles Python to bytecode, pretty much like Java compilers do). -
bioDan56227y@elazar Many interpreted languages like Ruby and Python are designed for productivity and not for only small scale development, there are many use cases like GitHub.
Also, these "implementation details" are actually properties of programming languages. -
@bioDan Haskell is an (extremely!) strongly typed compiled language, and it's shorter than all others:
import Data.Time
getZonedTime
Or Rust, also strong type system, compiled:
extern crate chrono;
fn main() {
println!("{:?}", Local::now());
}
Java is just a special little snowflake.
I made this a couple of years ago for a joke but no one really got it.
It's a printable smartwatch that always tells the right time, no need for charging...
joke/meme
printable smartwatch