Tag Info

Hot answers tagged

28

Please note Java is not just a language, it's a platform. That said, consider this: Oracle sells Java-related hardware (servers) Oracle sells Java-related courses and certification Oracle sells Java-related tech support services Often times hardware companies (Oracle is also a hardware company ever since buying Sun) gives you some software for free, like ...


23

Many programmers prefer working with classes. It's a very easy-to-understand concept that is a good model of human thought processes about the world (that is, we instinctively relate real objects to the abstract group of items we consider them to belong to, which is what a class is). Also, classes make reasoning about object types easier: in a class-based ...


19

From the perspective of programming language theory I would say neither. A programming language is 3 things A set of rules for constructing programs: the grammar of the language. A set of rules for determining whether a particular program is a valid program without running it: the static semantics of the language* A set of rules for actually evaluating a ...


16

Haskell's type system is fully inferrable (leaving aside polymorphic recursion, certain language extensions, and the dreaded monomorphism restriction), yet programmers still frequently provide type annotations in the source code even when they don't need to. Why? Type annotations serve as documentation. This is especially true with types as expressive as ...


10

You seem to think that programming languages differ only in their syntax. This is not the case. Languages can have vastly incompatible semantics as well. For example: A functional language that uses lazy evaluation and an imperative language that allows side effects are difficult to combine. A language that allows pointer arithmetic and a language that ...


10

Question 1) What’s the need for a Class in a dynamic language? Why the language is designed that way to use a class as some kind of “template” instead of do it the prototype-way and just use a object? The very first OO language (even though it wasn't called "OO"), Simula, didn't have inheritance. Inheritance was added in Simula-67, and it was based on ...


10

The only Java platforms that Oracle gives away for free (both gratis and libre), are the desktop and server ones. (And that is only a recent development, not too long ago, Oracle JRockit was proprietary and commercial.) As others have already said, Oracle makes money on the desktop and server by selling hardware and operating systems underneath, and ...


9

Java is not free. Anyone who sells devices (e.g.: phones, Blu-ray players, TVs) based on Java ME or distributes customized Java runtimes (e.g.: IBM, Apple) is paying Oracle royalties.


6

Although it doesn't matter in terms of the compiler - either the compiler will accept or reject a function name format depending on the language's syntax rules - there are a lot of good reasons why you should care about it. Ease of long-term maintenance, helping team members understand your code, are all important. Whichever formatting 'rules' you accept ...


6

You could use some languages with compiled implementations available on all the 3 platforms, e.g. Ocaml or Common Lisp or Haskell or Scheme (or maybe Go, Rust, Opa, Haxe, ...) You could also use implementations which compiles to C or C++ code, in particular Bigloo, Hop, etc.... (At some point Mozart/Oz was doing so) BTW, notice that even C has some runtime ...


6

While some of the existing answers address how Oracle makes money directly from Java, there is another effect, known in economics as a complementary good. By reducing the price of software (the complementary good), Oracle can raise the demand for their hardware that runs the software (and also for their DBMS software). You will often see software ...


5

There's no universal answer for all languages; it just depends on what's been implemented for a particular language. Haskell, in particular, can be either compiled or interpreted. Some declarative languages may only have interpreters currently, but a compiler could be written in the future. Also, don't assume that just because a language implementation is ...


4

In .NET, there are two categories of type: references and values (int, double, structs, enums etc). Amongst their differences is the fact that a reference can be null, whereas a value cannot. Thus if you have a value type and want to convey "optional" or "unknown" semantics, you can adorn it with Nullable<>. Note that Nullable<> is constrained by ...


4

Is this industry standard to rush things? To some degree. Companies are in business to make money, and (almost universally) business people want things faster - even at the expense of some hand-wavy quality. Furthermore, is it industry standard not to do testing, comment code, create documentation etc.. ? At my current company, we have no QA ...


4

Coding standards should be specific to the particulars of each language and platform. An idiom that is considered essential in C++ might be superfluous for another language such as C#. For example, you might insist of always placing a constant in an 'if' expression on the left (5 = x) to reduce the chances of accidentally having a single equals accepted as ...


4

There are many easily embeddable interpreters, notably GNU guile (and other Scheme variants, e.g. libscheme), Lua, Tcl, and even Python, OCaml, Perl (e.g. with parrot), NekoVM ... Notice that if your software becomes popular enough, and if its (advanced) users are permitted to script it (i.e. if the scripting ability is documented and accessible or ...


3

Let me cite from your own question: "… more JavaScript, but I can't find the time or passion …" "I would definitely happily learn fay-lang or purescript …" It seems obvious to me what is the more likely course of action. You obviously don't enjoy JavaScript as much as the other languages you mention. Having fun while learning and feeling ...


3

Use an existing one -= don't bother reinventing the wheel when there are better wheels available, that are cheaper for you to use. Lua seems to be the most common C/C++ embedded script interpreter. There are even youtube tutorials on embeddeding it into your C++ programs, or codeproject.


3

If it can run in a browser, then JavaScript is available, as well as languages that compile to JavaScript like Dart, CoffeeScript, ClojureScript, and TypeScript. These are your only good choices for running on mobile devices as well as desktops and Chromebooks. For compiled desktop apps, there's Go. At a less mature state, there's D, Rust, and Nim.


3

There's really two things to understand: prototypal inheritance has nothing to do with performance at all. The performance issues come from runtime changes to the inheritance structure. prototypal inheritance (and flexible object structures) are not so much inherently slower, as they are harder to optimize. To illustrate the first claim, Ruby would be a ...


3

No, it does not matter how you format the names used in your program, with two caveats: Names with a similar function should be formatted the same for consistency. So, function names should have the same formatting and the same for variable and class names. The names should be consistent across the entire project, so everyone on the team must agree on it. ...


3

I've heard that on big projects, where teams of people are working together on the same code, that flexible languages (where you can modify an object's properties and methods during run-time) are liberties that other team members don't want you to have. They want to know, when they are dealing with an object, that the object will act just like the blueprint ...


3

Good question! Since the type is not explicitly annotated, it can at times make the code harder to read - leading to more bugs. Properly used it of course makes the code cleaner and more readable. If you're a pessimist and think that most programmers are bad (or work where most programmers are bad), this will be a net loss. While the type inference ...


3

In C#, type inference occurs at compile-time, so the runtime cost is zero. As a matter of style, var is used for situations where it is either inconvenient or unnecessary to manually specify the type. Linq is one such situation. Another is: var s = new SomeReallyLongTypeNameWith<Several, Type, Parameters>(andFormal,parameters); without which you ...


3

There are a number of errors of how open-source foundations, and foundations in general work, in your question. I can see why a foundation would update a free programming language- in order to make the world of programming more accessible and effective. In the beginning modern programming languages, like Python or Ruby, may have been designed as ...


2

There is a different connotation, even though they work very similarly. Everyone but Microsoft (insert eye-roll here) uses null and nullable only in the context of references. Options and Maybes are generally understood to refer to both references and values, especially in functional programming languages where referential transparency means there isn't ...


2

It looks great to me but I'm wondering if there are any trade-offs or why let's say Java or the old good languages don't have type inference Java happens to be the exception rather than the rule here. Even C++ (which I beleive qualifies as a "good old language" :) ) supports type inference with the auto keyword since the C++11 standard. It not only ...


2

Note that the latter definition only talks about the machine language of some computer, not about programming languages in a general sense. I suppose the machine language is a programming language, but when treating programming languages as sets of programs, we can reconcile that with the latter definition by rephrasing it like this: The machine language is ...


2

By definition of declarative languages, they cannot be executed in their purely declarative form; see e.g. the An intelligent system can and must use declarative knowledge efficiently paper of J.Pitrat, or several entries of his blog e.g. "stop programming!", "CAIA, my colleague", "know thyself", etc... So a declarative system is transforming the ...


1

The fact you already have experience with languages and have been working in a server/admin environment makes your bridging over much easier than others, so I'll focus on answering the two questions as best as I can based off of my experience. 1: What are your thoughts on the best areas to move into. Given that I have plenty of experience on *nix ...



Only top voted, non community-wiki answers of a minimum length are eligible