reification Questions
6
Solved
I have an interface that contains an array (or list) of T and some metadata.
interface DataWithMetadata<T> {
val someMetadata: Int
fun getData(): Array<T>
}
If I write the simplest...
Lot asked 22/10, 2017 at 0:20
5
Solved
I've read Neal Gafter's blog on the subject and am still unclear on a number of points.
Why is it not possible to create implementations of the Collections API that preserve type information given...
Courtier asked 18/5, 2009 at 21:10
2
Solved
I have the following method in Kotlin:
inline fun <reified T> foo() {
}
If I try to call this from Java like this:
myObject.foo();
OR like this:
myObject.<SomeClass>foo();
I g...
Scleroprotein asked 11/3, 2017 at 23:10
2
Answers found at Java 8 lambdas, Function.identity() or t->t seem to imply that Function.identity() is almost always equivalent to t -> t. However, in the testcase seen below, replacing t -&g...
Dekameter asked 26/6, 2016 at 3:34
4
Solved
Could anybody be so kind to give me a simple example of reification in RDF? I want to see if I understood it correctly.
For example, I propose the following case
Tolkien -> wrote -> Lord of...
Courante asked 21/8, 2009 at 15:42
13
Solved
This came up as a question I asked in an interview recently as something the candidate wished to see added to the Java language. It's commonly-identified as a pain that Java doesn't have reified ge...
Unripe asked 18/12, 2009 at 11:54
4
Solved
In Ruby, you can capture a call to a method which is missing and define it on the fly.
What I wanna accomplish in JavaScript is to have an object with no methods. I want a missing method to be tra...
Tenacious asked 27/11, 2011 at 3:10
2
Solved
I'm currently writing a DSL for a library and I'd like to supply type metadata using reified type parameters like this:
val config = Config.create()
.consumerFor<MyType>{
// consume
}
...
Richthofen asked 11/3, 2017 at 22:48
1
Solved
I was experimenting with setting uninitialized values and was trying to get the following to work. This is mostly a curiosity in the power (and limitations) of reified generics.
I was attempting t...
Greenish asked 9/8, 2016 at 19:10
3
Solved
I have an upcoming Logic exam and have been studying some past papers from my course. I've come across a question regarding reification and have posted it below;
Illustrate reification by using i...
Intransitive asked 8/5, 2016 at 10:12
1
Solved
Let's say I have a specialized class and an associated companion object:
trait Slice[@specialized +T] {
...
override def equals(that :Any) = that match {
case s :Slice[_] => ???
case _ =>...
Insolvency asked 27/11, 2015 at 19:59
4
Solved
I know that Java implements parametric polymorphism (Generics) with erasure. I understand what erasure is.
I know that C# implements parametric polymorphism with reification. I know that can make ...
Faliscan asked 7/8, 2015 at 11:13
2
Solved
I am have understand the basics of reification in RDF. Two clearly explanations are given here: explanation 1
and explanation 2. If you observe carefully, actually we can present in the sentence "E...
Lester asked 1/4, 2014 at 22:27
1
Solved
If I have a class like this: -
static class Foo {
public static void Bar<T>(T item) { Console.WriteLine(item.ToString(); }
}
I know that in this example it's unnecessary to use T since a...
Redman asked 11/12, 2012 at 16:41
2
Solved
Scala's Manifests are a way to get around some type erasure problems due to the JVM's lack of reified generics.
They are discussed in several other questions; here are a few:
What is a Manifest ...
Encephalitis asked 16/4, 2011 at 6:25
1
Solved
All I know about TypeTags is that they somehow replaced Manifests. Information on the Internet is scarce and doesn't provide me with a good sense of the subject.
So I'd be happy if someone shared ...
Prairie asked 31/8, 2012 at 15:43
6
Let me try rephrasing this:
I am looking for a robust RDF store or library with the following features:
Named graphs, or some other form of reification.
Version tracking (probably at the n...
Chromatograph asked 27/12, 2008 at 12:16
2
Solved
If I define the following generic event handler
trait Handles[E <: Event] {
def handle(event: E)
}
with event type's like this
trait Event {
}
class InventoryItemDeactivated(val id: UUID) ...
Equalitarian asked 20/12, 2011 at 21:54
1
Solved
I've been hearing a lot about different JVM languages, still in vaporware mode, that propose to implement reification somehow. I have this nagging half-remembered (or wholly imagined, don't know wh...
Airs asked 5/8, 2011 at 1:48
6
Solved
I read this term a lot in blogs about haskell and functional programming (specially in sigfpe's blog) but I don't have a clue about what it means. I get away with not knowing it most of the times, ...
Qnp asked 15/3, 2011 at 16:36
3
In C# I can overload methods on generic type as shown in the example below:
// http://ideone.com/QVooD
using System;
using System.Collections.Generic;
public class Test {
public static void Foo(...
Velamen asked 13/2, 2011 at 5:10
3
Solved
I know this question will probably provoke more discussion than concrete answers (which I know isn't preferable). But with the recent acquisition by Oracle, I was wondering if there's been any word...
Nib asked 29/7, 2010 at 3:45
4
Solved
As I understand it, C#/.Net generics support some degree of reification. So, if I have the following code:
List<int> list = new List<int>();
list.Add(1);
Will the value 1 be autoboxe...
Lavinalavine asked 18/9, 2010 at 10:39
2
Solved
I have a method fetchObjects(String) that is expected to return an array of Contract business objects. The className parameter tells me what kind of business objects I should return (of course this...
Integrand asked 19/12, 2008 at 13:20
1
© 2022 - 2024 — McMap. All rights reserved.