Code Monkey home page Code Monkey logo

hxc's Introduction

hxc

#Haxe Collection Library

##Collections

imperative / functional

mutable / immutable

  • List
  • DList
  • Array
  • Hash
  • OrderedHash
  • IntHash
  • Set
  • Bag
  • Tree
  • Graph

The idea is to compose a set of collections using [traits](http://en.wikipedia.org/wiki/Trait_(computer_programming\)) as a reuse mechanism and allow for granularity in composition of functionality. Default collections will be imperative and predictable except for some changes of terminology where it clarifies use.

##Notions

###Enumerable :

Thin shim on iterator, may have slightly different characteristics. For example, is it useful to have available collection changes during iteration?

###Traversable :

Two way iterator, with back() and hasBack().

###adjoin / disjoin###

For collections with one entry point i.e stack/queue, doesn't infer any 'endedness'.

###Array / Hash### In this schema there is no real difference between an Array and a Hash at the interface level:

        interface Indexed<V> implements Locatable<Int,V>

I think there is a good case for namespacing the existing collections to make it easier to roll your own datastructures.

        hx.List
        stx.fn.List

There shouldn't really be too much fooling around about which list is being inferred, and 'FunctionalList' type naming conventions aren't making good use of package names.

##Questions

Can / Should the base interfaces support both imperative / functional idioms? The return for a set command may be void or some feedback imperatively, but should be the new collection if it is immutable. Typing this may become difficult.

		set(k:K,v:V):C where C : Void
		set(k:K,v:V):C where C : Enumerable<V>

hxc's People

Contributors

0b1kn00b avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.