language-specifications Questions
3
Solved
Consider the following (trivial) code segment:
while (i++, i <= 10) {
// some more code
}
In the general case, C++ allows comma separated statements to be evaluated in any order. In the case...
Aguiar asked 1/11, 2010 at 19:57
1
Solved
In Scala 2.8 language specification, §6.26.5 Eta Expansion, it states that we need a maximal sub-expression, however, no definition of this can be found. Can someone clarify this?
Canaanite asked 7/1, 2014 at 10:52
1
Solved
In 6.1.6. of the C# language specification, there is:
The implicit reference conversions are:
(...)
From any reference-type to a reference-type T if it has an implicit identity or reference ...
Apuleius asked 5/1, 2014 at 15:25
2
Solved
How exactly is foreach implemented in C#?
I imagine a part of it looking like:
var enumerator = TInput.GetEnumerator();
while(enumerator.MoveNext())
{
// do some stuff here
}
However I'm...
Colliery asked 24/6, 2012 at 16:30
2
Solved
C# 5.0 is out now since August 2012. Where can I find the specification? They've stopped doing ECMA specs, but how about MSDN?
Righteousness asked 20/11, 2012 at 5:27
3
Solved
The C# 4.0 specs read:
When a virtual method is invoked, the runtime type of the instance for
which that invocation takes place determines the actual method
implementation to invoke. In a nonv...
Turkish asked 21/1, 2013 at 16:39
2
Solved
In a generic GetHashCode(T foo) method, I check whether foo is null.
However I just stumbled upon a strange Resharper warning.
In the following code, can foo never be null?
private class FooComp...
Cardsharp asked 17/9, 2012 at 11:8
4
Solved
I have the following code written in both C++ and C#
int i=0;
++i = 11;
After this C# compiler brings an error
The left-hand side of an assignment must be a variable, property or indexer
Bu...
Adal asked 1/3, 2012 at 13:18
2
Solved
I was wondering why it is not allowed in Java to overload Foo(Object[] args) with Foo(Object... args), though they are used in a different way?
Foo(Object[] args){}
is used like:
Foo(new Object...
Jailbreak asked 12/1, 2012 at 16:14
1
Solved
Does documentation for the Objective-C 2.0 ABI exist somewhere on the Internet? The release notes for objc4-493.9 say:
Forthcoming documentation will describe the ABI for the use of compilers an...
Lymphoid asked 11/12, 2011 at 2:2
3
(Note: I know how it is illegal, I'm looking for the reason that the language make it so.)
template<class c> void Foo(); // Note: no generic version, here or anywhere.
int main(){
Foo<i...
Oakleil asked 3/5, 2011 at 17:33
4
Solved
I thought this method was valid but I was wrong:
static void Equals<T>(T x, T y)
{
return x == y; //operator == can't be applied to type T
}
After reading the specifiation (§7.2.4 in v3.0...
Amaty asked 27/4, 2011 at 17:24
1
I wanted to write some educational code in Haskell with Unicode characters (non-Latin) in the identifiers. (So that the identifiers look nice and natural for speakers of a natural language other th...
Lockage asked 1/4, 2011 at 18:34
3
Solved
More a question out of curiosity than anything, but why does C# define two different "purposes" for the keyword using? On one hand, it's a directive...
used to create an alias for a
namespace ...
Stemware asked 10/3, 2011 at 14:19
7
Solved
MSDN says that a class that would be 16 bytes or less would be better handled as a struct [citation].
Why is that?
Does that mean that if a struct is over 16 bytes it's less efficient than a class ...
Dilemma asked 20/3, 2009 at 18:2
4
Solved
Section 6.1 Implicit conversions defines an identity conversion thusly:
An identity conversion converts from any type to the same type. This conversion exists such that an entity that already ha...
Ardehs asked 17/9, 2010 at 15:38
1
Solved
The C# language specification describes type inference in Section §7.5.2. There is a detail in it that I don’t understand. Consider the following case:
// declaration
void Method<T>(T obj, F...
Textuary asked 13/9, 2010 at 0:24
3
Solved
I have a C# 4.0 parser. It accepts 'dynamic' as a keyword as a type. My parser trips over
statements found in working C# 3.0 programs of the form of:
dynamic = <exp> ;
So, it dynamic reall...
Headlock asked 23/1, 2010 at 17:32
2
Solved
I have to maintain a portion of Access 2003 VBA code, which is not my primary programming language, and while I'm pretty solid on doing regular stuff, I would still like to have a pure spec of the ...
Bibliography asked 14/10, 2009 at 18:2
© 2022 - 2024 — McMap. All rights reserved.