dynamic-typing Questions
9
Solved
According to Wikipedia
Computer scientists consider a language "type-safe" if it does not allow operations or conversions that violate the rules of the type system.
Since Python runtime checks...
Pad asked 24/9, 2017 at 8:57
7
Solved
Since python is dynamically typed, of course we can do something like this:
def f(x):
return 2 if x else "s"
But is this the way python was actually intended to be used? Or in other words, do u...
Gourde asked 9/8, 2016 at 15:1
11
Solved
I wondered if there is a programming language which compiles to machine code/binary that features dynamic and/or weak typing (not bytecode then executed by a VM, that's something completely differe...
Pavis asked 31/3, 2010 at 17:24
19
Solved
What does it mean when we say a language is dynamically typed versus statically typed?
Cookshop asked 4/10, 2009 at 22:36
11
Solved
What is the difference between Static/Dynamic and Strong/Weak typing?
Hime asked 28/2, 2010 at 13:42
4
How often do you take advantage of dynamic typing in a way that really wouldn't be feasible in a statically typed language?
What I'm interested in is, how often these are used within real world (...
Tenement asked 19/7, 2010 at 10:38
6
Solved
I want to know how to use variables for objects and function names in Python. In PHP, you can do this:
$className = "MyClass";
$newObject = new $className();
How do you do this sort of thing in...
Dink asked 21/10, 2008 at 21:24
1
Solved
I would like to be able to provide a function with a tuple of types which would then be used to deserialize the returned data from a transaction. The function would then return the instances of tho...
Jeraldjeraldine asked 27/2, 2018 at 21:57
9
Solved
I have a Python function that takes a numeric argument that must be an integer in order for it behave correctly. What is the preferred way of verifying this in Python?
My first reaction is t...
Bonanno asked 20/1, 2009 at 23:58
1
In PHP, which is dynamically typed, we can create functions that may accept multiple data types as parameters. We can then operate on the data depending on the type of the variable. There are two w...
Garbanzo asked 8/4, 2016 at 7:35
6
Solved
In C# 4.0, you can use the "dynamic" keyword as a placeholder for a type that is not known until runtime. There are certain corner cases where this is extremely useful behavior. Is it possible to e...
Drucie asked 12/11, 2010 at 2:52
2
Solved
Is there any way to explicitly require in Julia (e.g. say within a module or package) that types must be declared? Does e.g. PackageCompiler or Lint.jl have any support for such checks? More broadl...
Homochromatic asked 30/12, 2019 at 15:7
6
Solved
How can one reliably determine if an object has a numpy type?
I realize that this question goes against the philosophy of duck typing, but idea is to make sure a function (which uses scipy and num...
Feinberg asked 24/9, 2012 at 16:49
3
Solved
In programming language what is the difference between Inferred Type and Dynamic typing? I know about Dynamic typing but don't get how dynamic typing is differ from Inferred Type and how? Could som...
Mainsail asked 6/7, 2014 at 18:4
7
Solved
Simple question folks: I do a lot of programming (professionally and personally) in compiled languages like C++/Java and in interpreted languages like Python/Javascript. I personally find that my c...
Novia asked 8/9, 2009 at 13:0
3
Solved
For example, in Haxe I can create strictly typed variables:
var a:Float = 1.1; or var b:String = "hello" and also dynamic, if needed:
var d:Dynamic = true;
d = 22;
d = "hi";
How do I create thi...
Jug asked 9/3, 2017 at 16:7
2
I today learned that dynamically typed programming languages do type checking at run-time as opposed to statically typed languages which do so at Compile-time.(Correct me if I am wrong). What...
Fenelia asked 8/1, 2017 at 13:40
3
Solved
I want to write a function with this type signature:
getTypeRep :: Typeable a => t a -> TypeRep
where the TypeRep will be the type representation for a, not for t a. That is, the compiler ...
Vogue asked 7/5, 2011 at 22:56
2
I'm starting to learn Python and as a primarily Java developer the biggest issue I am having is understanding when and when not to use type checking. Most people seem to be saying that Python code ...
Mcloughlin asked 23/12, 2016 at 16:53
3
Solved
I read this question, but it didn't give me a clear answer:
How does Python interpreter look for types?
How does python interpreter know the type of a variable? I'm not looking how do get the type...
European asked 14/7, 2016 at 6:21
8
Can someone tell me what Strong typing and weak typing means and which one is better?
Thankful asked 27/11, 2008 at 9:36
2
user=> (def m (sorted-map 1 2))
#'user/m
user=> (map? m)
true
user=> (get m :type)
ClassCastException java.lang.Long cannot be cast to clojure.lang.Keyword
clojure.lang.Keyword.compareTo ...
Amyl asked 24/5, 2016 at 10:13
3
Solved
My Java classes represent entities inside a database, and I find it practical to override the equals method of my classes to make comparisons by id. So for example in my Transaction class I have th...
Android asked 8/2, 2016 at 22:29
0
I'm trying to implement a toy language with dynamic typing, i.e., variables do not have types, only values do, and every variable needs to be declared before being used. For example, the code...
Pantywaist asked 3/9, 2015 at 13:7
1
Solved
I was working through the Using Text Kit to Manage Text in Your iOS Apps tutorial. It was written for Objective C but I thought I would try to do it anyway using Swift.
However, when I got to the ...
Transcendental asked 26/2, 2015 at 6:1
1 Next >
© 2022 - 2024 — McMap. All rights reserved.