Questions tagged [dynamic-languages]

17 questions
247
votes
6 answers

Why do dynamic languages make it more difficult to maintain large codebases?

Large codebases are more difficult to maintain when they are written in dynamic languages. At least that's what Yevgeniy Brikman, lead developer bringing the Play Framework to LinkedIn says in a video presentation recorded at JaxConf 2013 (minute…
Jus12
  • 2,501
  • 4
  • 16
  • 8
121
votes
8 answers

Why does the US government disallow dynamic languages for secure projects?

I know some people that are currently working on a project for the US military (low security level, non-combat human resources type data). An initial state of the project code was submitted to the military for review, and they ran the program…
Patrick
  • 2,922
  • 2
  • 21
  • 24
57
votes
11 answers

IDEs for dynamic languages - how far can you get?

I find it frustrating how the speed of development that dynamic languages should offer gets significantly compromised by the lack of completions and other assets that IDEs would give you in their static counterparts. It's not just about typing less…
deprecated
  • 3,297
  • 3
  • 20
  • 26
23
votes
4 answers

Why would many duck-typed dynamic programming languages use a class-based approach instead of prototype-based OOP?

Since quite many dynamic programming languages have the feature of duck typing, and they can also open up and modify class or instance methods at anytime (like Ruby and Python), then… Question 1) What’s the need for a class in a dynamic language?…
11
votes
5 answers

Is Liskov Substitution Principle incompatible with Introspection or Duck Typing?

Do I understand correctly that Liskov Substitution Principle cannot be observed in languages where objects can inspect themselves, like what is usual in duck typed languages? For example, in Ruby, if a class B inherits from a class A, then for every…
Alexey
  • 932
  • 7
  • 19
8
votes
3 answers

Dynamic typing function arguments - how to keep readability high?

Dynamic typing newbie here, hoping for some wizened words of wisdom. I'm curious if there is a set of best practices out there for dealing with function arguments (and let's be honest, variables in general) in dynamically typed languages such as…
5
votes
2 answers

Does this code follow duck typing?

The principle of duck typing says that you shouldn't care what type of object you have - just whether or not you can do the required action with your object. For this reason the isinstance keyword is frowned upon. - -Definition In below…
4
votes
5 answers

How are mixed, sizeless lists implemented in higher level languages?

Most higher level (or scripting) languages out there have data structures that can hold different types of data (like numbers, strings and even functions) in the same structure, and you can also add elements without caring about their size, which…
user6245072
  • 303
  • 1
  • 7
4
votes
4 answers

Higher coding standards for dynamic languages?

Due to the inherent risks associated with using dynamic languages (e.g. Python, Ruby) carelessly, what (if any) standards should be imposed on production code written in these languages?
rdasxy
  • 3,323
  • 7
  • 29
  • 41
3
votes
5 answers

Is this how dynamic language copes with dynamic requirement?

The question is in the title. I want to have my thinking verified by experienced people. You can add more or disregard my opinion, but give me a reason. Here is an example requirement: Suppose you are required to implement a fighting game.…
Amumu
  • 824
  • 2
  • 8
  • 14
3
votes
2 answers

New insights I can learn from the Groovy language

I realize that, for a programmer coming from the Java world, Groovy contains a lot of new ideas and cool tricks. My situation is different, as I am learning Groovy coming from a dynamic background, mainly Python and Javascript. When learning a new…
Andrea
  • 5,355
  • 4
  • 31
  • 36
1
vote
2 answers

What's the benefit of having everything as an object in dynamically typed programming language?

modern dynamic programming languages like Python, Ruby and Javascript all take the approach of treating everything as an object, what's the benefit of this approach, and what's the curse of it? Benefit I can think of: first class functions, duck…
1
vote
2 answers

How to write comments to explain the "why" behind the callback function when the function and parameter names are insufficient for that?

How should I approach writing comments for callback functions? I want to explain the "why" behind the function when the function and parameter names are insufficient to explain what's going on. I have always wonder why comments like this can be so…
1
vote
1 answer

Is it justified to use project-wide unique function and variable names to help future refactoring?

Refactoring tools (like ReSharper) often can't be sure whether to rename a given identifier when, for example refactoring a JavaScript function. I guess this is a consequence of JavaScript's dynamic nature. ReSharper solves this problem by offering…
Attila Kun
  • 111
  • 3
0
votes
1 answer

Structuring a Compiler in a Dynamic Language (JavaScript)

For learning purposes, I'm trying to build a compiler in JavaScript for a tiny custom language and turn it into WASM. So far, I've got a lexer and parser, that turn my code into an AST, my question is about the next step: compiling/emitting WASM…
Pandawan
  • 19
  • 3
1
2