Open Phyn opened 9 months ago
On 4, we have the 'dummy' type that can be used in several cases, and type overloading works for many nodes if you try to connect another type to an existing input of the node as long a node of the attempted type exists.
I'd die for Tuples and Unions, though I'd say Dummy follows the other examples as Detla says
On 4, we have the 'dummy' type that can be used in several cases, and type overloading works for many nodes if you try to connect another type to an existing input of the node as long a node of the attempted type exists.
I just wish operators would just spawn with a default or the dummy type, instead of having to go through the extra step of selecting from the dozens of write nodes - which is ultimately pointless anyways, because it'd change type to conform to the input anyways.
I'd die for Tuples and Unions
Wouldn't this be solved with Collections?
I just wish operators would just spawn with a default or the dummy type, instead of having to go through the extra step of selecting from the dozens of write nodes - which is ultimately pointless anyways, because it'd change type to conform to the input anyways.
Maybe the dummy type could be put at the top of the type suggestions for now? That would simplify things somewhat.
Wouldn't this be solved with Collections?
A tuple could be considered to be an obscure type of collection, but a union isn't a collection and is different in a way that really only works well when the language implements it directly
Related: #110 for the placeholder type and #572 for collections (tuples and maybe typedefs)
Is your feature request related to a problem? Please describe.
There are several generic types that are quite useful in languages similar to ProtoFlux. These can range in usefulness from simply saving space when moving data around to simplifying data storage and error handling. These would both simplify a lot of Flux, and also would work in conjunction with the collections of #572
Describe the solution you'd like
Tuples
Unions
Type definitions
A placeholder type
Describe alternatives you've considered
Tuples and Unions can be bodged together using existing types and Flux, but both would provide clear and more readable shortcuts as well as standardizing the implementation. Type definitions and placeholders are simply shortcuts to complex types and would have little to no impact on actual running Flux.
Additional Context
Tuples and Unions are both described by name within the F# language reference and it could be referred to for most of the details already provided. There may be other languages such as Rust that contain additional useful types, but these are what I'm familiar with and could use.