strong-typing Questions

1

Is Scala strongly typed ? Do you have example how is it being reflected in the language type system? Does Scala allow type punning? Does it allow coercion? Does Scala have polytypes like ML?...
Wadai asked 1/6, 2015 at 13:1

5

Solved

There are plenty of options for powerful server side languages, but I can't think of any strongly typed, truly powerful client side languages. Javascript does a lot with forms, basic math, and inte...
Hydro asked 30/6, 2012 at 1:29

4

Solved

I frequently write C# code that has to use magic strings to express property names. Everyone knows the problems with magic strings. They are very difficult to refactor, they have no compile time ch...
Percentage asked 17/2, 2012 at 20:43

2

Let us look at the following code: transformBi (++"asdasd") [1,2,3,4] Clearly, this code does nothing, but it still compiles fine. I would like to create a new version of transformBi that will n...
Tablespoon asked 8/9, 2014 at 6:49

4

Solved

How do I initialize a vector with an array of values? I tried this and it complies fine, but does not work! langs = new Vector.<String>(["en","fr"]); I also need to load an arbitrary arr...
Randallrandan asked 13/11, 2010 at 17:42

9

I am struggling to see the real-world benefits of loosely coupled code. Why spend so much effort making something flexible to work with a variety of other objects? If you know what you need to achi...
Pedal asked 30/10, 2010 at 5:30

1

Solved

Lua is generally a strongly-typed language, providing almost no implicit conversion between data types. However, numbers and strings do get automatically coerced in a few cases: Lua provides au...
Urumchi asked 5/3, 2014 at 23:36

2

Solved

This is EF6. I can include .Include() method (no puns intended) in my queries to eager-load information from related tables. However it looks like .Include() method accepts a string parameter only....
Erskine asked 17/4, 2014 at 14:43

1

Solved

I'm working on my first 'real' Haskell project, and simultaneously trying to get my head around event sourcing. (It seemed like a good match; event sourcing is a rather functional way of looking at...
Margalo asked 25/2, 2014 at 20:58

9

Is there a way to enforce explicit cast for typedefs of the same type? I've to deal with utf8 and sometimes I get confused with the indices for the character count and the byte count. So it be nice...
Extramarital asked 17/12, 2008 at 23:33

6

Solved

I've a view with a strong type. This strong type has a field consisting of a byte[], this array contains a picture. Is it possible to display this image with something like @Html.Image(Model.myIma...
Corticosteroid asked 18/5, 2011 at 6:51

1

I've done a bit of programming and Haskell, and wanted to implement some Haskell list processing functions in Groovy. Below is an implementation of unfoldr. Basically A is the type of the resulting...
Cipher asked 27/5, 2013 at 0:59

3

Solved

I am a bit tired of writing lines of service layer codes like these: Below codes just an example for readers. So they may have errors or typos, sorry about it :) //ViewModel public class EntityIn...
Brachio asked 2/8, 2013 at 21:18

4

Solved

I don't know what exactly the difference between "Strongly typed" and "Type safety" is! Could you please clarify this in a simple language? Suppose we are using Arraylist, but I am unable to conc...
Thiamine asked 1/8, 2013 at 2:55

1

Solved

I am compiling files and get working compiled code but the annotations seem to be completely ignored; no warnings no errors. Using calcdeps.py to compile my code with the following command: set ca...
Abdulabdulla asked 24/4, 2013 at 5:51

5

Solved

program TypeCategory; {$R+} var sInt : shortint; iInt : integer; begin readln(iInt); sInt := iInt; writeln(sInt); end. Considering the above example,pascal language do allow assignment from ...
Dirtcheap asked 17/1, 2010 at 16:22

4

Solved

What I really like in C# are generic lists. A list that can contain only one type of objects. Is there something like a generic list in Cocoa/Objective-C? As far I only know NSArray who will take ...
Enloe asked 27/4, 2009 at 14:6

1

Solved

Note: This is ASP.NET Web Forms Model Binding in .NET 4.5 and NOT MVC. I am using the new Strongly Typed Model Binding features of ASP.NET Web Forms (4.5) to produce a list of items that can be ed...
Tried asked 18/2, 2013 at 10:9

1

Solved

Since OCaml has different operations for multiplying integers and doubles, how it can be object-oriented? Doesn't this mean OCaml has no polymorphism?
Photodynamics asked 20/1, 2013 at 12:37

7

Solved

It must be a somewhat common event to change the name of a property and expect the Rename functionality in Visual Studio to take care of all the necessary renaming, except for the property name of ...
Secretive asked 14/7, 2009 at 21:16

3

Solved

I have a collection of IEnumerable<School> that is being passed to an extension method that populates a DropDownList. I would also like to pass the DataValueField and DataTextField as an argu...
Goodoh asked 25/10, 2012 at 17:42

3

Solved

This is a hard question about language design, patterns and semantics. Please, don't down-vote just because you don't see the practical value. First, let's think about functions and their paramete...
Landonlandor asked 14/10, 2012 at 2:42

1

From what I understand, dynamic typing is the same as weak typing and strong typing is the same as static typing, but I'm not sure I'm correct.
Swayder asked 9/8, 2012 at 18:20

4

I am phrasing my example in generic terms because it gets the point across without having to go into my specific problem details. Suppose you had a bunch of methods that take strings as parameters...
Reaves asked 26/3, 2012 at 18:2

1

In Leroy's paper on how recursive modules are typed in OCaml, it is written that modules are checked in an environment made of approximations of module types: module rec A = ... and B = ... and C ...

© 2022 - 2024 — McMap. All rights reserved.