HackerTrans
TopNewTrendsCommentsPastAskShowJobs

sttaft

no profile record

comments

sttaft
·letztes Jahr·discuss
For what it's worth, the ParaSail parallel programming language (https://github.com/parasail-lang/parasail) supports this:

    func Search(Root : Tree; Desired_Value : Tree_Value)
      -> optional Tree_Id is   
        var Identifier : optional Tree_Id := null;
 
        for T => Root then Left(T) || Right(T)
          while T not null concurrent loop
 
           if Value(T) == Desired_Value then
              // Found desired node,
              // exit with its identifier
              exit loop with Identifier => Key(T);
           end if;
 
        end loop;
 
        return Identifier;
    end func Search;
I actually don't use this feature much, because usually there is a key of some sort that determines which side of the tree is of interest.
sttaft
·vor 3 Jahren·discuss
For what it is worth, Ada was not "designed by committee" more than most languages. It was designed by a design team, and in each revision, there was a strong technical leader of the design team, with the whole design team sharing a strong design aesthetic. I doubt you could say even that about many mainstream languages these days.