Skip to main content
Tweeted twitter.com/StackSoftEng/status/1364772144488579077
Removed from Network Questions by Thomas Owens
Post Reopened by Doc Brown, Thomas Owens
Post Undeleted by Thomas Owens
made the question more eligible for undeleting
Source Link
Doc Brown
  • 220.3k
  • 35
  • 410
  • 623

So, the question is: How can I simulate such scenario in a language like Java? It would be also helpful to get some background information of how this is solved in other programming languages.

So, the question is: How can I simulate such scenario in a language like Java?

So, the question is: How can I simulate such scenario in a language like Java? It would be also helpful to get some background information of how this is solved in other programming languages.

Question Protected by gnat
deleted 17 characters in body; edited tags; edited title
Source Link
user218158
user218158

Is there any programming language with How can I simulate a "negative" type system?

So, the question is: Is there any programmingHow can I simulate such scenario in a language out there with this sort of type systemlike Java?

Is there any programming language with a "negative" type system?

So, the question is: Is there any programming language out there with this sort of type system?

How can I simulate a "negative" type system?

So, the question is: How can I simulate such scenario in a language like Java?

Post Deleted by Thomas Owens
Post Closed as "Not suitable for this site" by gnat, Robert Harvey, Thomas Owens
Became Hot Network Question
added 5 characters in body; edited title
Source Link
user218158
user218158

Is there any programming language with an "exclusion"a "negative" type system?

In my experience, all languages I know have a sort of "addition""positive" type system. What I mean by "addition"positive type system" is that when you are writing the source code, you always specify what types your function/objects accept, like:

I think it would be very useful in scenarios where you need to specify the behavior for some families of types without the need to write a lot of boilerplate code to implement some type exclusion logic.

Is there any programming language with an "exclusion" type system?

In my experience, all languages I know have a sort of "addition" type system. What I mean by "addition type system" is that when you are writing the source code, you always specify what types your function/objects accept, like:

I think it would be very useful in scenarios where you need to specify the behavior for some families of types without the need to write a lot of boilerplate code to implement some exclusion logic.

Is there any programming language with a "negative" type system?

In my experience, all languages I know have a sort of "positive" type system. What I mean by "positive type system" is that when you are writing the source code, you always specify what types your function/objects accept, like:

I think it would be very useful in scenarios where you need to specify the behavior for some families of types without the need to write a lot of boilerplate code to implement some type exclusion logic.

added 49 characters in body
Source Link
user218158
user218158
Loading
added 39 characters in body
Source Link
user218158
user218158
Loading
added 3359 characters in body
Source Link
user218158
user218158
Loading
added 801 characters in body
Source Link
user218158
user218158
Loading
Loading
added 467 characters in body
Source Link
user218158
user218158
Loading
added 331 characters in body
Source Link
user218158
user218158
Loading
edited title
Link
Robert Harvey
  • 200.7k
  • 55
  • 470
  • 683
Loading
rephrase the question
Source Link
user218158
user218158
Loading
Source Link
user218158
user218158
Loading