strong-typing Questions
1
Solved
From the definition of strongly-typed language:
A strongly-typed programming language is one in which each type of
data (such as integer, character, hexadecimal, packed decimal, and so
forth)...
Gentleman asked 11/1, 2019 at 9:48
1
Solved
I have decorated a method with a typescript decorator adding a member to the method:
export class MyClass {
@AddMyMember()
public myMethod(param1:string) {
// ...
}
}
So that I should be abl...
Athwartships asked 6/11, 2018 at 14:2
4
Solved
I have a simple scenario of a login that requires user's input a email and password in Typescript. I need to create some type to get this strong-typed and send it to the back-end.
Should thi...
Ries asked 6/8, 2018 at 23:17
4
Solved
I have a Interface IBase and a variable that contains a few other objects (in the sample i just added base for a better demonstration)
interface IBase {
height?:number;
width?:number;
}
var ele...
Soften asked 17/6, 2014 at 13:7
4
I am using eclipse for python and I am facing a problem. I have many classes with many properties and want a list of objects from one of my declared classes. The problem is: When I am accessing any...
Derickderide asked 17/8, 2009 at 14:53
8
What makes a language strongly typed? I'm looking for the most important aspects of a strongly typed language.
Yesterday I asked if PowerShell was strongly typed, but no one could agree on the def...
Astroid asked 23/9, 2008 at 14:34
4
Solved
If I have a normal (weak) enumeration, I can use its enumerated values as non-type template parameters, like so:
enum { Cat, Dog, Horse };
template <int Val, typename T> bool magic(T &t...
Nice asked 22/2, 2012 at 18:15
14
Solved
What are primitive type in Java?
What is the difference between a primitive type and a reference type?
How many primitive types does Java have, and what are they?
Impractical asked 3/5, 2012 at 11:38
3
I have some JSON containing anonymous objects coming to my client-side. Is there some built-in mechanism or external library for converting these anonymous objects into strongly-typed TypeScript ob...
Touraine asked 29/8, 2013 at 17:6
6
Solved
Say I have a class with one property
Public Class MyClass
Public Property MyItem() as Object
....
End Property
End Class
I have to pass the name of the property to a function call. (Please do...
Harrisonharrod asked 31/12, 2009 at 6:7
1
Solved
why is this:
var myArrayBuffer = fs.readFileSync(file, null)
returning an uInt8 array instead of a just a arrayBuffer? why does this seem to work?
var myArrayBuffer = fs.readFileSync(file, null...
Implacable asked 3/5, 2017 at 20:5
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
1
Solved
Prompted by Lyndon's question earlier today:
a.
julia> function f1(x::Float64)
const y = x;
y = "This should throw an error since y is of constant type";
return y;
end
f1 (generic fun...
Footed asked 23/2, 2017 at 17:15
5
Solved
I am developing an ASP.NET MVC project and want to use strongly-typed session objects. I have implemented the following Controller-derived class to expose this object:
public class StrongControlle...
Inarch asked 10/11, 2009 at 20:14
2
I created a simple class with one field. class Test{int value;}
If I use the "preserve references" feature and set it to "all" (i.e. both objects and arrays), then when I simply serialize an array...
Lindane asked 2/12, 2013 at 8:1
4
Solved
I am new to Derby and I noticed that I face similar problems as when using the DB2 RDBMS as far as null values are concerned. The Derby documentation states, that a null value must have a type asso...
Lusty asked 5/2, 2011 at 8:11
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
3
Solved
This type could be
data NonEmptyList a = NEL a [a]
The functions head, tail, and others will become methods of a newly created Listable type class. Some functions can already fit in an existing ...
Bally asked 29/12, 2014 at 19:46
2
Solved
I was looking over the TypeScript handbook and I can't seem to find the answer.
If I am using a library that no typings exist, what are my options?
One is to create the typings file, but this I d...
Inspiratory asked 25/4, 2016 at 7:13
1
Solved
Visual Studio, hint that document.body is a HTMLElement, and not a HTMLBodyElement, why is that? - I haven't had any luck searching for an answer.
class Test {
documentBody1: HTMLBodyElement;
do...
Adown asked 9/2, 2016 at 16:28
7
Solved
I would like to access csv files in scala in a strongly typed manner. For example, as I read each line of the csv, it is automatically parsed and represented as a tuple with the appropriate types. ...
Ventail asked 15/6, 2013 at 17:55
7
Solved
Perhaps I am demonstrating my ignorance of some oft-used feautre of C# or the .NET framework, but I would like to know if there is a natively-supported way to create a type alias like EmailAddress ...
Railroad asked 17/12, 2009 at 23:39
2
Solved
Since PHP7 we can now use scalar typehint and ask for strict types on a per-file basis. Are there any performance benefits from using these features? If yes, how?
Around the interwebs I've only fo...
Mccrory asked 5/10, 2015 at 1:37
14
Solved
Let's say I am writing an API, and one of my functions take a parameter that represents a channel, and will only ever be between the values 0 and 15. I could write it like this:
void Func(unsigned...
Hilarius asked 5/7, 2010 at 19:32
11
Solved
I'm new to Mac/iPhone programming and Objective-C. In C# and Java we have "generics", collection classes whose members can only be of the type declared. For example, in C#
Dictionary<int, MyCu...
Sipes asked 11/5, 2009 at 15:27
© 2022 - 2024 — McMap. All rights reserved.