Skip to main content

Questions tagged [static-typing]

A statically-typed language is a language (such as Java, C, or C++) where variable types are known at compile time. In most of these languages, types must be expressly indicated by the programmer; in other cases (such as OCaml, Javascript), type inference allows the programmer to not indicate their variable types. Reference: Mozilla

5 votes
3 answers
653 views

How much auto is too much when creating utility functions in C++? Here's an example. I have a Qt application where, at some point, I need to find what is the maximum value among the integers that are ...
Arseni Mourzenko's user avatar
0 votes
3 answers
251 views

Question Body I'm currently developing a Python coding standard for use in enterprise-level internal systems. Our typical use cases include: API input/output validation Reading from databases, ...
agolta's user avatar
  • 77
12 votes
9 answers
6k views

In my understanding, the strengths of not using type are flexible and newbie-friendly, and the strengths of using type are easier to debug and reading code. However now you can use types on ...
Ooker's user avatar
  • 335
0 votes
1 answer
317 views

Lately I've been surveying the programming language landscape and one of the languages I looked at was Pharo, a modern Smalltalk. Programming using a living system that runs in a virtual machine seems ...
Daniel Arant's user avatar
3 votes
2 answers
320 views

In this toy example some_function is... some function that takes a dict as an input and modifies it in place somehow. def some_function(dct: dict): """Do something to the items in ...
Alexander Soare's user avatar
4 votes
3 answers
1k views

I was reading the excellent book by Axel Raushmayer, Tackling TypeScript. In this section of Chapter 7, the author makes the interesting claim In many programming languages, null is part of all ...
Ray Toal's user avatar
  • 1,335
1 vote
3 answers
323 views

Suppose you are given a python API: def onArgumentReceived(x): doWhatever(x) # expects a unicode string I am not a security expert by any stretch of the imagination, however on the face of this, ...
Anon's user avatar
  • 3,649
4 votes
5 answers
548 views

See: Type inference with duck typing - does this work? Why is it not used? And: General approach for proving decidability/undecidability Hello, I wanted to ask a theoretical question about type system ...
SeriousBusiness100's user avatar
7 votes
5 answers
6k views

C# is considered a statically-typed language. However, it contains keywords such as: var, which infers the type at compile time, and dynamic, which determines the type at runtime. Is this a ...
X Y's user avatar
  • 321
1 vote
1 answer
4k views

Context Suppose one has a list of algorithms, which each have a multiple run/parameter configurations. Next, one wrote a generic function def get_mdsa_configs(self) -> List[MDSA_config]: that ...
a.t.'s user avatar
  • 225
-2 votes
1 answer
380 views

Let me start by saying my knowledge of microservices isn't as strong as it could be. My understanding of DDD is that we'd draw a bounded context over an entity and that would be our service. How does ...
Quesofat's user avatar
3 votes
1 answer
224 views

To illustrate the problem, I'm defining a PositiveNumber class that is a subclass of a Number class. As Python doesn't support type casting, I'm defining the from_number as a convenience method I can ...
Aresto's user avatar
  • 41
2 votes
3 answers
279 views

I am brain storming on how to create a type system for a programming language, and what the compiler will do with the typing information. Here is what I have found, followed by the main question, ...
Lance Pollard's user avatar
4 votes
2 answers
2k views

As I understand, every programming language is either statically type checked or dynamically type checked (and there are cases where these two approaches are mixed, but for simplicity I won't mention ...
RussoTuristo's user avatar
1 vote
1 answer
1k views

I'm not sure if static vs. dynamic mock is the terminology used to describe this comparison, but I got this terminology from types of mocking static vs dynamic and Hand-rolled mocks made easy. To ...
Mario Ishac's user avatar

15 30 50 per page
1
2 3 4 5 6